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

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

Issue 1293963002: Fixing the Position of Context Menu for BrowserPlugin (<webview>) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a Build Error in MAC Created 5 years, 3 months 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 "extensions/browser/guest_view/web_view/web_view_guest.h" 9 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
(...skipping 21 matching lines...) Expand all
32 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; 32 void OnShowContextMenu(int request_id, const MenuItemVector* items) override;
33 bool ShouldHandleFindRequestsForEmbedder() const override; 33 bool ShouldHandleFindRequestsForEmbedder() const override;
34 34
35 WebViewGuest* web_view_guest() const { return web_view_guest_; } 35 WebViewGuest* web_view_guest() const { return web_view_guest_; }
36 36
37 private: 37 private:
38 content::WebContents* guest_web_contents() const { 38 content::WebContents* guest_web_contents() const {
39 return web_view_guest()->web_contents(); 39 return web_view_guest()->web_contents();
40 } 40 }
41 41
42 void SetContextMenuPosition(const gfx::Point& position) override;
43
42 // Returns the top level items (ignoring submenus) as Value. 44 // Returns the top level items (ignoring submenus) as Value.
43 static scoped_ptr<base::ListValue> MenuModelToValue( 45 static scoped_ptr<base::ListValue> MenuModelToValue(
44 const ui::SimpleMenuModel& menu_model); 46 const ui::SimpleMenuModel& menu_model);
45 47
46 void InjectChromeVoxIfNeeded(content::RenderViewHost* render_view_host); 48 void InjectChromeVoxIfNeeded(content::RenderViewHost* render_view_host);
47 49
48 #if defined(OS_CHROMEOS) 50 #if defined(OS_CHROMEOS)
49 // Notification of a change in the state of an accessibility setting. 51 // Notification of a change in the state of an accessibility setting.
50 void OnAccessibilityStatusChanged( 52 void OnAccessibilityStatusChanged(
51 const chromeos::AccessibilityStatusEventDetails& details); 53 const chromeos::AccessibilityStatusEventDetails& details);
(...skipping 11 matching lines...) Expand all
63 scoped_ptr<RenderViewContextMenuBase> pending_menu_; 65 scoped_ptr<RenderViewContextMenuBase> pending_menu_;
64 66
65 #if defined(OS_CHROMEOS) 67 #if defined(OS_CHROMEOS)
66 // Subscription to receive notifications on changes to a11y settings. 68 // Subscription to receive notifications on changes to a11y settings.
67 scoped_ptr<chromeos::AccessibilityStatusSubscription> 69 scoped_ptr<chromeos::AccessibilityStatusSubscription>
68 accessibility_subscription_; 70 accessibility_subscription_;
69 #endif 71 #endif
70 72
71 WebViewGuest* const web_view_guest_; 73 WebViewGuest* const web_view_guest_;
72 74
75 scoped_ptr<gfx::Point> context_menu_position_;
76
73 // This is used to ensure pending tasks will not fire after this object is 77 // This is used to ensure pending tasks will not fire after this object is
74 // destroyed. 78 // destroyed.
75 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; 79 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
76 80
77 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); 81 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
78 }; 82 };
79 83
80 } // namespace extensions 84 } // namespace extensions
81 85
82 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 86 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698