--- /dev/null
+/*
+ * Copyright (C) 2015 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "content/browser/renderer_host/edge_effect.h"
+
+#include <Edje.h>
+
+#include "base/logging.h"
+#include "base/path_service.h"
+#include "base/files/file_path.h"
+#include "content/common/paths_efl.h"
+
+namespace content {
+
+bool EdgeEffect::enabled_globally_ = true;
+
+namespace {
+void viewResizeCallback(void* data, Evas*, Evas_Object* view, void*) {
+ int width, height;
+ evas_object_geometry_get(view, 0, 0, &width, &height);
+ static_cast<EdgeEffect*>(data)->ResizeObject(width, height);
+}
+
+void viewMoveCallback(void* data, Evas*, Evas_Object* view, void*) {
+ int x, y;
+ evas_object_geometry_get(view, &x, &y, 0, 0);
+ static_cast<EdgeEffect*>(data)->MoveObject(x, y);
+}
+
+void viewShowCallback(void* data, Evas*, Evas_Object* view, void*) {
+ static_cast<EdgeEffect*>(data)->ShowObject();
+}
+
+void viewHideCallback(void* data, Evas*, Evas_Object* view, void*) {
+ static_cast<EdgeEffect*>(data)->HideObject();
+}
+}
+
+EdgeEffect::EdgeEffect(Evas_Object* parent)
+ : enabled_(true)
+ , parent_view_(parent)
+ , edge_object_(NULL) {
+ DCHECK(parent);
+
+ edge_object_ = edje_object_add(evas_object_evas_get(parent));
+ CHECK(edge_object_);
+
+ base::FilePath edj_dir;
+ base::FilePath edge_edj;
+ PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+ edge_edj = edj_dir.Append(FILE_PATH_LITERAL("Edge.edj"));
+ CHECK(edje_object_file_set(edge_object_,
+ edge_edj.AsUTF8Unsafe().c_str(), "edge_effect"));
+
+ int x, y, width, height;
+ evas_object_geometry_get(parent, &x, &y, &width, &height);
+ evas_object_move(edge_object_, x, y);
+ evas_object_resize(edge_object_, width, height);
+ evas_object_show(edge_object_);
+ evas_object_pass_events_set(edge_object_, EINA_TRUE);
+
+ evas_object_event_callback_add(parent,
+ EVAS_CALLBACK_RESIZE, &viewResizeCallback, this);
+ evas_object_event_callback_add(parent,
+ EVAS_CALLBACK_MOVE, &viewMoveCallback, this);
+ evas_object_event_callback_add(parent,
+ EVAS_CALLBACK_SHOW, &viewShowCallback, this);
+ evas_object_event_callback_add(parent,
+ EVAS_CALLBACK_HIDE, &viewHideCallback, this);
+}
+
+EdgeEffect::~EdgeEffect() {
+ evas_object_del(edge_object_);
+ evas_object_event_callback_del(parent_view_,
+ EVAS_CALLBACK_RESIZE, viewResizeCallback);
+ evas_object_event_callback_del(parent_view_,
+ EVAS_CALLBACK_MOVE, viewMoveCallback);
+ evas_object_event_callback_del(parent_view_,
+ EVAS_CALLBACK_SHOW, viewShowCallback);
+ evas_object_event_callback_del(parent_view_,
+ EVAS_CALLBACK_HIDE, viewHideCallback);
+}
+
+//static
+void EdgeEffect::EnableGlobally(bool enable) {
+ enabled_globally_ = enable;
+}
+
+void EdgeEffect::Show(const std::string& source) {
+ if (!enabled_ && !enabled_globally_)
+ return;
+
+ const char* state = 0;
+ double ret = 0;
+ if (source.find("top") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_top", &ret);
+ else if (source.find("bottom") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_bottom", &ret);
+ else if (source.find("left") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_left", &ret);
+ else if (source.find("right") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_right", &ret);
+
+ if (!strcmp(state, "visible"))
+ return;
+
+ edje_object_signal_emit(edge_object_, "edge,show", source.c_str());
+}
+
+void EdgeEffect::Hide(const std::string& source) {
+ const char* state = 0;
+ double ret = 0;
+ if (source.find("top") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_top", &ret);
+ else if (source.find("bottom") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_bottom", &ret);
+ else if (source.find("left") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_left", &ret);
+ else if (source.find("right") != std::string::npos)
+ state = edje_object_part_state_get(edge_object_, "edge_effect_right", &ret);
+
+ if (strcmp(state, "visible"))
+ return;
+
+ edje_object_signal_emit(edge_object_, "edge,hide", source.c_str());
+}
+
+void EdgeEffect::Hide() {
+ edje_object_signal_emit(edge_object_, "edge,hide", "edge,top");
+ edje_object_signal_emit(edge_object_, "edge,hide", "edge,bottom");
+ edje_object_signal_emit(edge_object_, "edge,hide", "edge,left");
+ edje_object_signal_emit(edge_object_, "edge,hide", "edge,right");
+}
+
+void EdgeEffect::Enable() {
+ enabled_ = true;
+}
+
+void EdgeEffect::ResizeObject(int width, int height) {
+ DCHECK(edge_object_);
+ evas_object_resize(edge_object_, width, height);
+}
+
+void EdgeEffect::MoveObject(int x, int y) {
+ DCHECK(edge_object_);
+ evas_object_move(edge_object_, x, y);
+}
+
+void EdgeEffect::ShowObject() {
+ DCHECK(edge_object_);
+ evas_object_show(edge_object_);
+}
+
+void EdgeEffect::HideObject() {
+ DCHECK(edge_object_);
+ evas_object_hide(edge_object_);
+}
+
+void EdgeEffect::Disable() {
+ Hide();
+ enabled_ = false;
+}
+
+} // namespace content
--- /dev/null
+/*
+ * Copyright (C) 2015 Samsung Electronics
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EDGE_EFFECT_H
+#define EDGE_EFFECT_H
+
+#include <Evas.h>
+#include <string>
+
+namespace content {
+
+class EdgeEffect {
+ public:
+ EdgeEffect(Evas_Object* view);
+ ~EdgeEffect();
+
+ static void EnableGlobally(bool enable);
+
+ void Show(const std::string& source);
+ void Hide(const std::string& source);
+ void Hide();
+ void Enable();
+ void Disable();
+
+ void ResizeObject(int width, int height);
+ void MoveObject(int x, int y);
+ void ShowObject();
+ void HideObject();
+
+ private:
+ // Is the effect enabled globally for all EdgeEffect instances.
+ static bool enabled_globally_;
+
+ // Is this instance of EdgeEffect enabled.
+ bool enabled_;
+
+ Evas_Object* parent_view_;
+ Evas_Object* edge_object_;
+};
+
+} // namespace content
+
+
+#endif // EDGE_EFFECT_H
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/ui_events_helper.h"
+#include "content/browser/renderer_host/edge_effect.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/browser/renderer_host/disambiguation_popup_efl.h"
#include "content/browser/renderer_host/web_event_factory_efl.h"
im_context_ = IMContextEfl::Create(this);
#endif
+ edge_effect_.reset(new EdgeEffect(content_image_elm_host_));
+
Init_EvasGL(width, height);
#if defined(OS_TIZEN_MOBILE)
}
void RenderWidgetHostViewEfl::DidStopFlinging() {
-#if 0
-#if defined(TIZEN_EDGE_EFFECT)
- if (web_view_)
- web_view_->edgeEffect()->hide();
-#endif
+ edge_effect_->Hide();
+#if 0
SelectionControllerEfl* controller = GetSelectionController();
if (!controller)
return;
frame_subscriber_.reset();
}
-#ifdef TIZEN_EDGE_EFFECT
void RenderWidgetHostViewEfl::DidOverscroll(const DidOverscrollParams& params) {
- if (web_view_) {
- const gfx::Vector2dF& accumulated_overscroll = params.accumulated_overscroll;
- const gfx::Vector2dF& latest_overscroll_delta = params.latest_overscroll_delta;
-
- if (latest_overscroll_delta.x() < 0 && (int)accumulated_overscroll.x() < 0)
- web_view_->edgeEffect()->show("edge,left");
- if (latest_overscroll_delta.x() > 0 && (int)accumulated_overscroll.x() > 0)
- web_view_->edgeEffect()->show("edge,right");
- if (latest_overscroll_delta.y() < 0 && (int)accumulated_overscroll.y() < 0)
- web_view_->edgeEffect()->show("edge,top");
- if (latest_overscroll_delta.y() > 0 && (int)accumulated_overscroll.y() > 0)
- web_view_->edgeEffect()->show("edge,bottom");
- }
+ const gfx::Vector2dF& accumulated_overscroll = params.accumulated_overscroll;
+ const gfx::Vector2dF& latest_overscroll_delta = params.latest_overscroll_delta;
+
+ if (latest_overscroll_delta.x() < 0 && (int)accumulated_overscroll.x() < 0)
+ edge_effect_->Show("edge,left");
+ if (latest_overscroll_delta.x() > 0 && (int)accumulated_overscroll.x() > 0)
+ edge_effect_->Show("edge,right");
+ if (latest_overscroll_delta.y() < 0 && (int)accumulated_overscroll.y() < 0)
+ edge_effect_->Show("edge,top");
+ if (latest_overscroll_delta.y() > 0 && (int)accumulated_overscroll.y() > 0)
+ edge_effect_->Show("edge,bottom");
}
-#endif
void RenderWidgetHostViewEfl::ReturnSubscriberTexture(
base::WeakPtr<RenderWidgetHostViewEfl> rwhvefl,
}
void RenderWidgetHostViewEfl::HandleGestureBegin() {
+ edge_effect_->Enable();
#if 0
selection_acked_on_tap_ = false;
was_scrolled_ = false;
-
-#ifdef TIZEN_EDGE_EFFECT
- web_view_->edgeEffect()->enable();
-#endif
if (GetSelectionController()) {
should_restore_selection_menu_ =
GetSelectionController()->IsAnyHandleVisible();
}
void RenderWidgetHostViewEfl::HandleGestureEnd() {
+ edge_effect_->Disable();
#if 0
if (GetSelectionController()) {
if (GetSelectionController()->GetScrollStatus())
}
// Edge effect should be disabled upon scroll end/fling start.
// Gesture end comes just after those events, so it's disabled here.
-#ifdef TIZEN_EDGE_EFFECT
- web_view_->edgeEffect()->disable();
-#endif
#endif
}
if (GetSelectionController())
GetSelectionController()->SetScrollStatus(true);
} else if (web_view_ && event.type == blink::WebInputEvent::GestureScrollUpdate) {
-#ifdef TIZEN_EDGE_EFFECT
if (event.data.scrollUpdate.deltaX < 0)
- web_view_->edgeEffect()->hide("edge,left");
+ edge_effect_->Hide("edge,left");
else if (event.data.scrollUpdate.deltaX > 0)
- web_view_->edgeEffect()->hide("edge,right");
+ edge_effect_->Hide("edge,right");
if (event.data.scrollUpdate.deltaY < 0)
- web_view_->edgeEffect()->hide("edge,top");
+ edge_effect_->Hide("edge,top");
else if (event.data.scrollUpdate.deltaY > 0)
- web_view_->edgeEffect()->hide("edge,bottom");
+ edge_effect_->Hide("edge,bottom");
} else if (web_view_ && event.type == blink::WebInputEvent::GesturePinchBegin) {
- web_view_->edgeEffect()->disable();
+ edge_effect_->Disable();
} else if (web_view_ && event.type == blink::WebInputEvent::GesturePinchEnd) {
- web_view_->edgeEffect()->enable();
-#endif
+ edge_effect_->Enable();
}
#endif
}
namespace content {
class DisambiguationPopupEfl;
+class EdgeEffect;
#if 0
class IMContextEfl;
#endif
void BeginFrameSubscription(
scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
void EndFrameSubscription() override;
-
-#ifdef TIZEN_EDGE_EFFECT
void DidOverscroll(const DidOverscrollParams& params) override;
-#endif
-
void AcceleratedSurfaceInitialized(int) override;
bool HasAcceleratedSurface(const gfx::Size&) override;
void GetScreenInfo(blink::WebScreenInfo*) override;
scoped_ptr<ui::GestureRecognizer> gesture_recognizer_;
scoped_ptr<DisambiguationPopupEfl> disambiguation_popup_;
+ scoped_ptr<EdgeEffect> edge_effect_;
int current_orientation_;
'browser/tracing/tracing_controller_efl.cc',
'browser/renderer_host/disambiguation_popup_efl.h',
'browser/renderer_host/disambiguation_popup_efl.cc',
+ 'browser/renderer_host/edge_effect.h',
+ 'browser/renderer_host/edge_effect.cc',
'browser/renderer_host/native_web_keyboard_event_efl.cc',
'browser/renderer_host/render_widget_host_view_efl.h',
'browser/renderer_host/render_widget_host_view_efl.cc',
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/common/paths_efl.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/browser/render_view_host.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/browser/layout_test/layout_test_javascript_dialog_manager.h"
-#include "efl/window_factory.h"
#include "components/js_dialogs_efl/javascript_dialog_manager_efl.h"
+#include "efl/window_factory.h"
#include "ui/gl/gl_switches.h"
#include "cc/base/switches.h"
void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_config_preferred_engine_set("opengl_x11");
+ PathsEfl::Register();
LOG(INFO) << "EFL Shell platform initialized";
}
+++ /dev/null
-// Copyright 2013 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "EdgeEffect.h"
-
-#include <assert.h>
-#include <Edje.h>
-
-#include "private/ewk_settings_private.h"
-#include "eweb_view.h"
-
-#ifdef TIZEN_EDGE_EFFECT
-
-bool EdgeEffect::m_settingsEnable = true;
-
-EdgeEffect::EdgeEffect(Evas_Object* view)
- : enabled(true)
- , m_view(view)
- , m_edgeObject(NULL) {
- assert(m_view);
-
- evas_object_event_callback_add(m_view, EVAS_CALLBACK_RESIZE, viewResizeCallback, this);
- evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOVE, viewMoveCallback, this);
- evas_object_event_callback_add(m_view, EVAS_CALLBACK_SHOW, viewShowCallback, this);
- evas_object_event_callback_add(m_view, EVAS_CALLBACK_HIDE, viewHideCallback, this);
- EWebView* web_view = EWebView::FromEvasObject(m_view);
- if (!web_view)
- return;
-
- if (web_view->GetSettings())
- m_settingsEnable = web_view->GetSettings()->edgeEffectEnabled();
-}
-
-EdgeEffect::~EdgeEffect() {
- if (m_edgeObject)
- evas_object_del(m_edgeObject);
-
- evas_object_event_callback_del(m_view, EVAS_CALLBACK_RESIZE, viewResizeCallback);
- evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOVE, viewMoveCallback);
- evas_object_event_callback_del(m_view, EVAS_CALLBACK_SHOW, viewShowCallback);
- evas_object_event_callback_del(m_view, EVAS_CALLBACK_HIDE, viewHideCallback);
-}
-
-void EdgeEffect::viewResizeCallback(void* data, Evas*, Evas_Object* view, void*) {
- int width;
- int height;
- evas_object_geometry_get(view, 0, 0, &width, &height);
- static_cast<EdgeEffect*>(data)->resizeObject(width, height);
-}
-
-void EdgeEffect::viewMoveCallback(void* data, Evas*, Evas_Object* view, void*) {
- int x;
- int y;
- evas_object_geometry_get(view, &x, &y, 0, 0);
- static_cast<EdgeEffect*>(data)->moveObject(x, y);
-}
-
-void EdgeEffect::viewShowCallback(void* data, Evas*, Evas_Object* view, void*) {
- static_cast<EdgeEffect*>(data)->showObject();
-}
-
-void EdgeEffect::viewHideCallback(void* data, Evas*, Evas_Object* view, void*) {
- static_cast<EdgeEffect*>(data)->hideObject();
-}
-
-void EdgeEffect::show(const std::string& source) {
- if (!enabled || !ensureEdgeObject())
- return;
-
- const char* state = 0;
- double ret = 0;
- if (source.find("top")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_top", &ret);
- else if (source.find("bottom")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_bottom", &ret);
- else if (source.find("left")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_left", &ret);
- else if (source.find("right")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_right", &ret);
-
- if (!strncmp(state, "visible", 7))
- return;
-
- edje_object_signal_emit(m_edgeObject, "edge,show", source.c_str());
-}
-
-void EdgeEffect::hide(const std::string& source) {
- if(!ensureEdgeObject())
- return;
-
- const char* state = 0;
- double ret = 0;
- if (source.find("top")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_top", &ret);
- else if (source.find("bottom")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_bottom", &ret);
- else if (source.find("left")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_left", &ret);
- else if (source.find("right")!=std::string::npos)
- state = edje_object_part_state_get(m_edgeObject, "edge_effect_right", &ret);
-
- if (strncmp(state, "visible", 7))
- return;
-
- edje_object_signal_emit(m_edgeObject, "edge,hide", source.c_str());
-}
-
-void EdgeEffect::hide() {
- if (!ensureEdgeObject())
- return;
-
- edje_object_signal_emit(m_edgeObject, "edge,hide", "edge,top");
- edje_object_signal_emit(m_edgeObject, "edge,hide", "edge,bottom");
- edje_object_signal_emit(m_edgeObject, "edge,hide", "edge,left");
- edje_object_signal_emit(m_edgeObject, "edge,hide", "edge,right");
-}
-
-void EdgeEffect::resizeObject(int width, int height) {
- if (!m_edgeObject)
- return;
-
- evas_object_resize(m_edgeObject, width, height);
-}
-
-void EdgeEffect::moveObject(int x, int y) {
- if (!m_edgeObject)
- return;
-
- evas_object_move(m_edgeObject, x, y);
-}
-
-void EdgeEffect::showObject() {
- if (!m_edgeObject)
- return;
-
- evas_object_show(m_edgeObject);
-}
-
-void EdgeEffect::hideObject() {
- if (!m_edgeObject)
- return;
-
- evas_object_hide(m_edgeObject);
-}
-
-Evas_Object* EdgeEffect::ensureEdgeObject() {
- EWebView* web_view = EWebView::FromEvasObject(m_view);
- if (!web_view)
- return NULL;
-
- if(!m_settingsEnable)
- return NULL;
-
- if (!m_edgeObject) {
- m_edgeObject = edje_object_add(evas_object_evas_get(m_view));
- if (!m_edgeObject)
- return NULL;
-
- if (!edje_object_file_set(m_edgeObject, EDGE_EDJE_FILE, EDJE_EFFECT_GROUP))
- return NULL;
-
- evas_object_smart_member_add(m_edgeObject, m_view);
-
- int x;
- int y;
- int width;
- int height;
- evas_object_geometry_get(m_view, &x, &y, &width, &height);
- evas_object_move(m_edgeObject, x, y);
- evas_object_resize(m_edgeObject, width, height);
- evas_object_show(m_edgeObject);
- evas_object_pass_events_set(m_edgeObject, EINA_TRUE);
- }
-
- return m_edgeObject;
-}
-
-void EdgeEffect::disable() {
- hide();
- enabled = false;
-}
-
-#endif // TIZEN_EDGE_EFFECT
+++ /dev/null
-// Copyright 2013 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef EdgeEffect_h
-#define EdgeEffect_h
-
-#ifdef TIZEN_EDGE_EFFECT
-#include <string>
-#include <Evas.h>
-#include "base/memory/ref_counted.h"
-
-#define EDGE_EDJE_FILE EDJE_DIR"/Edge.edj"
-#define EDJE_EFFECT_GROUP "edge_effect"
-
-class EdgeEffect : public base::RefCounted<EdgeEffect> {
- public:
- static scoped_refptr<EdgeEffect> create(Evas_Object* view)
- {
- return make_scoped_refptr(new EdgeEffect(view));
- }
- ~EdgeEffect();
-
- void show(const std::string& source);
- void hide(const std::string& source);
- void hide();
- void enable() { enabled = true; }
- void disable();
-
- static void viewResizeCallback(void* data, Evas*, Evas_Object*, void* eventInfo);
- static void viewMoveCallback(void* data, Evas*, Evas_Object*, void* eventInfo);
- static void viewShowCallback(void* data, Evas*, Evas_Object*, void* eventInfo);
- static void viewHideCallback(void* data, Evas*, Evas_Object*, void* eventInfo);
- static void setSettingsEnabled(bool enable) { m_settingsEnable = enable; };
-
- private:
- EdgeEffect(Evas_Object* view);
-
- Evas_Object* ensureEdgeObject();
- void resizeObject(int width, int height);
- void moveObject(int x, int y);
- void showObject();
- void hideObject();
- bool enabled;
-
- Evas_Object* m_view;
- Evas_Object* m_edgeObject;
- static bool m_settingsEnable;
-};
-
-#endif // TIZEN_EDGE_EFFECT
-
-#endif // EdgeEffect_h
'devtools_delegate_efl.h',
'devtools_manager_delegate_efl.cc',
'devtools_manager_delegate_efl.h',
- 'EdgeEffect.cpp',
- 'EdgeEffect.h',
'efl_webprocess_main.cc',
'efl_webprocess_main.h',
'eweb_context.cc',
web_contents_delegate_.reset(new WebContentsDelegateEfl(this));
web_contents_->SetDelegate(web_contents_delegate_.get());
-#ifdef TIZEN_EDGE_EFFECT
- edge_effect_ = EdgeEffect::create(evas_object_);
-#endif
back_forward_list_.reset(new _Ewk_Back_Forward_List(
web_contents_->GetController()));
#include "popup_controller_efl.h"
#endif
-#ifdef TIZEN_EDGE_EFFECT
-#include "EdgeEffect.h"
-#endif
-
#if defined(OS_TIZEN)
#include "browser/selectpicker/popup_picker.h"
#endif
#endif
void OnSnapshot(const std::vector<unsigned char>& pixData, int width, int height, int snapshotId);
-#ifdef TIZEN_EDGE_EFFECT
- scoped_refptr<EdgeEffect> edgeEffect() { return edge_effect_; }
-#endif
#ifdef TIZEN_CONTENTS_DETECTION
void ShowContentsDetectedPopup(const char*);
#endif
IDMap< WebAppScreenshotCapturedCallback, IDMapOwnPointer> screen_capture_cb_map_;
scoped_ptr<NotificationPermissionCallback> notification_permission_callback_;
content::DevToolsDelegateEfl* inspector_server_;
-#ifdef TIZEN_EDGE_EFFECT
- scoped_refptr<EdgeEffect> edge_effect_;
-#endif
#if defined(OS_TIZEN_MOBILE)
content::FileChooserParams::Mode filechooser_mode_;
#include "ewk_settings_private.h"
#include "net/http/http_stream_factory.h"
-#include "EdgeEffect.h"
+#include "content/browser/renderer_host/edge_effect.h"
void Ewk_Settings::setSpdyEnabled(bool flag)
{
void Ewk_Settings::setEdgeEffectEnabled(bool enable) {
m_edgeEffectEnabled = enable;
-#ifdef TIZEN_EDGE_EFFECT
- EdgeEffect::setSettingsEnabled(enable);
-#endif
+ content::EdgeEffect::EnableGlobally(enable);
}