| Index: chrome/browser/guest_view/web_view/web_view_guest.h
|
| diff --git a/chrome/browser/guest_view/web_view/web_view_guest.h b/chrome/browser/guest_view/web_view/web_view_guest.h
|
| index 45a9f34dbcb529dc264d797d5c9e375503c6df9f..532052de87112d9805dd9594127a010321eedfe8 100644
|
| --- a/chrome/browser/guest_view/web_view/web_view_guest.h
|
| +++ b/chrome/browser/guest_view/web_view/web_view_guest.h
|
| @@ -17,23 +17,12 @@
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "extensions/browser/guest_view/guest_view.h"
|
| +#include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
|
| #include "extensions/browser/script_executor.h"
|
| #include "third_party/WebKit/public/web/WebFindOptions.h"
|
|
|
| -#if defined(OS_CHROMEOS)
|
| -#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
|
| -#endif
|
| -
|
| -class RenderViewContextMenu;
|
| -
|
| -namespace ui {
|
| -class SimpleMenuModel;
|
| -} // namespace ui
|
| -
|
| namespace extensions {
|
|
|
| -namespace webview_api = api::web_view_internal;
|
| -
|
| class WebViewInternalFindFunction;
|
|
|
| // A WebViewGuest provides the browser-side implementation of the <webview> API
|
| @@ -69,12 +58,13 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| // Request navigating the guest to the provided |src| URL.
|
| void NavigateGuest(const std::string& src);
|
|
|
| - typedef std::vector<linked_ptr<webview_api::ContextMenuItem> > MenuItemVector;
|
| // Shows the context menu for the guest.
|
| // |items| acts as a filter. This restricts the current context's default
|
| // menu items to contain only the items from |items|.
|
| // |items| == NULL means no filtering will be applied.
|
| - void ShowContextMenu(int request_id, const MenuItemVector* items);
|
| + void ShowContextMenu(
|
| + int request_id,
|
| + const WebViewGuestDelegate::MenuItemVector* items);
|
|
|
| // Sets the frame name of the guest.
|
| void SetName(const std::string& name);
|
| @@ -243,10 +233,6 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
|
|
| virtual ~WebViewGuest();
|
|
|
| - // Returns the top level items (ignoring submenus) as Value.
|
| - static scoped_ptr<base::ListValue> MenuModelToValue(
|
| - const ui::SimpleMenuModel& menu_model);
|
| -
|
| void AttachWebViewHelpers(content::WebContents* contents);
|
|
|
| void OnWebViewNewWindowResponse(int new_window_instance_id,
|
| @@ -291,12 +277,6 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| static void RemoveWebViewStateFromIOThread(
|
| content::WebContents* web_contents);
|
|
|
| -#if defined(OS_CHROMEOS)
|
| - // Notification of a change in the state of an accessibility setting.
|
| - void OnAccessibilityStatusChanged(
|
| - const chromeos::AccessibilityStatusEventDetails& details);
|
| -#endif
|
| -
|
| void InjectChromeVoxIfNeeded(content::RenderViewHost* render_view_host);
|
|
|
| void LoadURLWithParams(const GURL& url,
|
| @@ -340,16 +320,9 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
|
|
| content::NotificationRegistrar notification_registrar_;
|
|
|
| - // A counter to generate a unique request id for a context menu request.
|
| - // We only need the ids to be unique for a given WebViewGuest.
|
| - int pending_context_menu_request_id_;
|
| -
|
| // True if the user agent is overridden.
|
| bool is_overriding_user_agent_;
|
|
|
| - // Set to |true| if ChromeVox was already injected in main frame.
|
| - bool chromevox_injected_;
|
| -
|
| // Stores the current zoom factor.
|
| double current_zoom_factor_;
|
|
|
| @@ -365,19 +338,11 @@ class WebViewGuest : public GuestView<WebViewGuest>,
|
| // Handels permission requests.
|
| scoped_ptr<WebViewPermissionHelper> web_view_permission_helper_;
|
|
|
| + scoped_ptr<WebViewGuestDelegate> web_view_guest_delegate_;
|
| +
|
| friend void WebViewFindHelper::DispatchFindUpdateEvent(bool canceled,
|
| bool final_update);
|
|
|
| - // Holds the RenderViewContextMenu that has been built but yet to be
|
| - // shown. This is .Reset() after ShowContextMenu().
|
| - scoped_ptr<RenderViewContextMenu> pending_menu_;
|
| -
|
| -#if defined(OS_CHROMEOS)
|
| - // Subscription to receive notifications on changes to a11y settings.
|
| - scoped_ptr<chromeos::AccessibilityStatusSubscription>
|
| - accessibility_subscription_;
|
| -#endif
|
| -
|
| // Tracks the name, and target URL of the new window. Once the first
|
| // navigation commits, we no longer track this information.
|
| struct NewWindowInfo {
|
|
|