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

Side by Side Diff: content/port/browser/render_view_host_delegate_view.h

Issue 10917102: Context menus should appear above the touch point if invoked by long press. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 5 #ifndef CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
6 #define CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 6 #define CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/common/context_menu_source_type.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
13 14
14 class SkBitmap; 15 class SkBitmap;
15 struct WebDropData; 16 struct WebDropData;
16 struct WebMenuItem; 17 struct WebMenuItem;
17 18
18 namespace gfx { 19 namespace gfx {
19 class ImageSkia; 20 class ImageSkia;
20 class Point; 21 class Point;
21 class Rect; 22 class Rect;
22 } 23 }
23 24
24 namespace content { 25 namespace content {
25 26
26 struct ContextMenuParams; 27 struct ContextMenuParams;
27 28
28 // This class provides a way for the RenderViewHost to reach out to its 29 // This class provides a way for the RenderViewHost to reach out to its
29 // delegate's view. It only needs to be implemented by embedders if they don't 30 // delegate's view. It only needs to be implemented by embedders if they don't
30 // use the default WebContentsView implementations. 31 // use the default WebContentsView implementations.
31 class CONTENT_EXPORT RenderViewHostDelegateView { 32 class CONTENT_EXPORT RenderViewHostDelegateView {
32 public: 33 public:
33 // A context menu should be shown, to be built using the context information 34 // A context menu should be shown, to be built using the context information
34 // provided in the supplied params. 35 // provided in the supplied params.
35 virtual void ShowContextMenu(const ContextMenuParams& params) {} 36 virtual void ShowContextMenu(const ContextMenuParams& params,
37 const ContextMenuSourceType& type) {}
jam 2012/09/07 17:07:56 ditto
36 38
37 // Shows a popup menu with the specified items. 39 // Shows a popup menu with the specified items.
38 // This method should call RenderViewHost::DidSelectPopupMenuItem[s]() or 40 // This method should call RenderViewHost::DidSelectPopupMenuItem[s]() or
39 // RenderViewHost::DidCancelPopupMenu() based on the user action. 41 // RenderViewHost::DidCancelPopupMenu() based on the user action.
40 virtual void ShowPopupMenu(const gfx::Rect& bounds, 42 virtual void ShowPopupMenu(const gfx::Rect& bounds,
41 int item_height, 43 int item_height,
42 double item_font_size, 44 double item_font_size,
43 int selected_item, 45 int selected_item,
44 const std::vector<WebMenuItem>& items, 46 const std::vector<WebMenuItem>& items,
45 bool right_aligned, 47 bool right_aligned,
(...skipping 19 matching lines...) Expand all
65 // retrieved by doing a Shift-Tab. 67 // retrieved by doing a Shift-Tab.
66 virtual void TakeFocus(bool reverse) {} 68 virtual void TakeFocus(bool reverse) {}
67 69
68 protected: 70 protected:
69 virtual ~RenderViewHostDelegateView() {} 71 virtual ~RenderViewHostDelegateView() {}
70 }; 72 };
71 73
72 } // namespace content 74 } // namespace content
73 75
74 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 76 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698