From: Arnaud Renevier Date: Mon, 5 Oct 2015 19:57:08 +0000 (-0700) Subject: Unite ewk_context_inspector_server and ewk_view_inspector_server X-Git-Tag: submit/tizen/20201118.160233~586 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44688820927c8528e4a83e31a3efa7305ed1f36d;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Unite ewk_context_inspector_server and ewk_view_inspector_server Right now, we have two different sets of api to start and stop the inspector server: ewk_context_inspector_server_(start/stop) and ewk_view_inspector_server_(start/stop). In this patch, we avoid this duplication: calls to ewk_view_inspector_server_ will internally be forwarded to EWebContext. Reviewed by: sns.park Change-Id: Ia8e6177cef962ae5addf37d541ae128aab2f8630 Signed-off-by: Arnaud Renevier --- diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 09889f3..4d3e0e8 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -55,7 +55,6 @@ #include "web_contents_view_efl_delegate_ewk.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/screen.h" -#include "devtools_delegate_efl.h" #include "permission_popup_manager.cc" #include "browser/web_view_evas_handler.h" @@ -290,7 +289,6 @@ EWebView::EWebView(Ewk_Context* context, Evas_Object* object) page_scale_factor_(1.0), min_page_scale_factor_(-1.0), max_page_scale_factor_(-1.0), - inspector_server_(NULL), is_initialized_(false) { } @@ -353,7 +351,6 @@ EWebView::~EWebView() if (!is_initialized_) { return; } - StopInspectorServer(); // inside is check to Inspector is running context_menu_.reset(); mhtml_callback_map_.Clear(); @@ -1981,20 +1978,11 @@ std::string EWebView::GetPlatformLocale() { } int EWebView::StartInspectorServer(int port) { - if (inspector_server_) { - inspector_server_->Stop(); // Asynchronous releas inside Stop() - } - inspector_server_ = new devtools_http_handler::DevToolsDelegateEfl(port); - return inspector_server_ ? inspector_server_->port() : 0; + return context_->InspectorServerStart(port); } bool EWebView::StopInspectorServer() { - if (!inspector_server_) { - return false; - } - inspector_server_->Stop(); // Asynchronous releas inside Stop() - inspector_server_ = NULL; - return true; + return context_->InspectorServerStop(); } void EWebView::InvokeWebProcessCrashedCallback() { diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 8f22a2c..c230d55 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -54,10 +54,6 @@ #include "ui/gfx/geometry/size.h" #include "web_contents_delegate_efl.h" -namespace devtools_http_handler { -class DevToolsDelegateEfl; -} - namespace content { class RenderViewHost; class RenderWidgetHostViewEfl; @@ -533,7 +529,6 @@ class EWebView { IDMap web_app_capable_get_callback_map_; scoped_ptr notification_permission_callback_; scoped_ptr permission_popup_manager_; - devtools_http_handler::DevToolsDelegateEfl* inspector_server_; scoped_ptr scroll_detector_; #if defined(OS_TIZEN_MOBILE) content::FileChooserParams::Mode filechooser_mode_;