Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h

Issue 678653003: Remove Downcasting RVContextMenuBase in ContextMenuDeleagate implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove virtual keyword when override is specified Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
7 7
8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" 8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h"
9 #include "chrome/browser/ui/zoom/zoom_observer.h" 9 #include "chrome/browser/ui/zoom/zoom_observer.h"
10 #include "extensions/browser/guest_view/web_view/web_view_guest.h" 10 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
11 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 11 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
12 12
13 #if defined(OS_CHROMEOS) 13 #if defined(OS_CHROMEOS)
14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
15 #endif 15 #endif
16 16
17 class RenderViewContextMenu; 17 class RenderViewContextMenuBase;
18 18
19 namespace ui { 19 namespace ui {
20 class SimpleMenuModel; 20 class SimpleMenuModel;
21 } // namespace ui 21 } // namespace ui
22 22
23 namespace extensions { 23 namespace extensions {
24 24
25 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate, 25 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate,
26 public ZoomObserver { 26 public ZoomObserver {
27 public : 27 public :
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // A counter to generate a unique request id for a context menu request. 68 // A counter to generate a unique request id for a context menu request.
69 // We only need the ids to be unique for a given WebViewGuest. 69 // We only need the ids to be unique for a given WebViewGuest.
70 int pending_context_menu_request_id_; 70 int pending_context_menu_request_id_;
71 71
72 // Set to |true| if ChromeVox was already injected in main frame. 72 // Set to |true| if ChromeVox was already injected in main frame.
73 bool chromevox_injected_; 73 bool chromevox_injected_;
74 74
75 // Stores the current zoom factor. 75 // Stores the current zoom factor.
76 double current_zoom_factor_; 76 double current_zoom_factor_;
77 77
78 // Holds the RenderViewContextMenu that has been built but yet to be 78 // Holds the RenderViewContextMenuBase that has been built but yet to be
79 // shown. This is .Reset() after ShowContextMenu(). 79 // shown. This is .reset() after ShowContextMenu().
80 scoped_ptr<RenderViewContextMenu> pending_menu_; 80 scoped_ptr<RenderViewContextMenuBase> pending_menu_;
81 81
82 #if defined(OS_CHROMEOS) 82 #if defined(OS_CHROMEOS)
83 // Subscription to receive notifications on changes to a11y settings. 83 // Subscription to receive notifications on changes to a11y settings.
84 scoped_ptr<chromeos::AccessibilityStatusSubscription> 84 scoped_ptr<chromeos::AccessibilityStatusSubscription>
85 accessibility_subscription_; 85 accessibility_subscription_;
86 #endif 86 #endif
87 87
88 WebViewGuest* const web_view_guest_; 88 WebViewGuest* const web_view_guest_;
89 89
90 // This is used to ensure pending tasks will not fire after this object is 90 // This is used to ensure pending tasks will not fire after this object is
91 // destroyed. 91 // destroyed.
92 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; 92 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); 94 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
95 }; 95 };
96 96
97 } // namespace extensions 97 } // namespace extensions
98 98
99 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 99 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
100 100
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698