#include "browser_main_parts_efl.h"
#include "browser_context_efl.h"
#include "web_contents_delegate_efl.h"
+#include "web_contents_view_delegate_ewk.h"
#include "devtools_manager_delegate_efl.h"
#include "browser/editor_client_observer.h"
#include "browser/geolocation/access_token_store_efl.h"
notification_callback_user_data_ = user_data;
}
+WebContentsViewDelegate* ContentBrowserClientEfl::GetWebContentsViewDelegate(
+ WebContents* web_contents) {
+ return new WebContentsViewDelegateEwk(WebViewFromWebContents(web_contents));
+}
+
}
return notification_controller_.get();
}
+ WebContentsViewDelegate* GetWebContentsViewDelegate(
+ WebContents* web_contents) override;
+
private:
static void SetCertificatePemOnUIThread(int render_process_id,
int render_view_id, std::string certificate);
'url_request_context_getter_efl.h',
'web_contents_delegate_efl.cc',
'web_contents_delegate_efl.h',
+ 'web_contents_view_delegate_ewk.cc',
+ 'web_contents_view_delegate_ewk.h',
'web_process_content_main_delegate_efl.cc',
'web_process_content_main_delegate_efl.h',
}
}
-void EWebView::ShowPopupMenu(const gfx::Rect& rect, blink::TextDirection textDirection, double pageScaleFactor, const std::vector<content::MenuItem>& items, int data, int selectedIndex, bool multiple) {
+void EWebView::ShowPopupMenu(const std::vector<content::MenuItem>& items,
+ int selectedIndex, bool multiple) {
#if defined(OS_TIZEN)
Eina_List* popupItems = 0;
const size_t size = items.size();
void Find(const char* text, tizen_webview::Find_Options);
void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
void SetContentSecurityPolicy(const char* policy, tizen_webview::ContentSecurityPolicyType type);
- void ShowPopupMenu(const gfx::Rect& rect, blink::TextDirection textDirection, double pageScaleFactor, const std::vector<content::MenuItem>& items, int data, int selectedIndex, bool multiple);
+ void ShowPopupMenu(const std::vector<content::MenuItem>& items,
+ int selectedIndex, bool multiple);
Eina_Bool HidePopupMenu();
void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
bool prevState, bool nextState);
}
}
-void WebContentsDelegateEfl::ShowPopupMenu(RenderFrameHost* render_frame_host,
- const gfx::Rect& rect,
- blink::TextDirection textDirection,
- double pageScaleFactor,
- const std::vector<MenuItem>& items,
- int data,
- int selectedIndex,
- bool multiple) {
- web_view_->ShowPopupMenu(rect,
- textDirection,
- pageScaleFactor,
- items,
- data,
- selectedIndex,
- multiple);
-}
-
-void WebContentsDelegateEfl::HidePopupMenu() {
- web_view_->HidePopupMenu();
-}
-
void WebContentsDelegateEfl::UpdateFormNavigation(int formElementCount,
int currentNodeIndex, bool prevState, bool nextState) {
web_view_->UpdateFormNavigation(formElementCount, currentNodeIndex,
void OnFormSubmit(const GURL&);
void OnUpdateSettings(const Ewk_Settings *settings);
void SetContentSecurityPolicy(const std::string& policy, tizen_webview::ContentSecurityPolicyType header_type);
- void ShowPopupMenu(RenderFrameHost* render_frame_host,
- const gfx::Rect& rect,
- blink::TextDirection textDirection,
- double pageScaleFactor,
- const std::vector<MenuItem>& items,
- int data,
- int selectedIndex,
- bool multiple);
- void HidePopupMenu();
void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
bool prevState, bool nextState);
--- /dev/null
+// Copyright 2015 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 "web_contents_view_delegate_ewk.h"
+
+#include "eweb_view.h"
+
+WebContentsViewDelegateEwk::WebContentsViewDelegateEwk(EWebView* wv)
+ : web_view_(wv) {
+}
+
+void WebContentsViewDelegateEwk::ShowPopupMenu(
+ content::RenderFrameHost* render_frame_host,
+ const gfx::Rect& bounds,
+ int item_height,
+ double item_font_size,
+ int selected_item,
+ const std::vector<content::MenuItem>& items,
+ bool right_aligned,
+ bool allow_multiple_selection) {
+ web_view_->ShowPopupMenu(items, selected_item, allow_multiple_selection);
+}
+
+void WebContentsViewDelegateEwk::HidePopupMenu() {
+ web_view_->HidePopupMenu();
+}
--- /dev/null
+// Copyright 2015 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 WEB_CONTENTS_VIEW_DELEGATE_EFL
+#define WEB_CONTENTS_VIEW_DELEGATE_EFL
+
+#include "content/public/browser/web_contents_view_delegate.h"
+
+#include "content/public/common/menu_item.h"
+
+class EWebView;
+
+namespace content {
+class RenderFrameHost;
+}
+
+class WebContentsViewDelegateEwk : public content::WebContentsViewDelegate {
+ public:
+ WebContentsViewDelegateEwk(EWebView*);
+
+ void ShowPopupMenu(
+ content::RenderFrameHost* render_frame_host,
+ const gfx::Rect& bounds,
+ int item_height,
+ double item_font_size,
+ int selected_item,
+ const std::vector<content::MenuItem>& items,
+ bool right_aligned,
+ bool allow_multiple_selection) override;
+ void HidePopupMenu() override;
+
+ private:
+ EWebView* web_view_;
+};
+
+#endif // WEB_CONTENTS_VIEW_DELEGATE_EFL
+