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

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

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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/common/drag_event_source_info.h" 12 #include "content/common/drag_event_source_info.h"
13 #include "third_party/WebKit/public/web/WebDragOperation.h" 13 #include "third_party/WebKit/public/web/WebDragOperation.h"
14 14
15 class SkBitmap; 15 class SkBitmap;
16 16
17 namespace gfx { 17 namespace gfx {
18 class ImageSkia; 18 class ImageSkia;
19 class Rect; 19 class Rect;
20 class Vector2d; 20 class Vector2d;
21 } 21 }
22 22
23 namespace content { 23 namespace content {
24 class RenderFrameHost;
24 struct ContextMenuParams; 25 struct ContextMenuParams;
25 struct DropData; 26 struct DropData;
26 struct MenuItem; 27 struct MenuItem;
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(RenderFrameHost* render_frame_host,
37 const ContextMenuParams& params) {}
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<MenuItem>& items, 46 const std::vector<MenuItem>& items,
45 bool right_aligned, 47 bool right_aligned,
(...skipping 22 matching lines...) Expand all
68 // retrieved by doing a Shift-Tab. 70 // retrieved by doing a Shift-Tab.
69 virtual void TakeFocus(bool reverse) {} 71 virtual void TakeFocus(bool reverse) {}
70 72
71 protected: 73 protected:
72 virtual ~RenderViewHostDelegateView() {} 74 virtual ~RenderViewHostDelegateView() {}
73 }; 75 };
74 76
75 } // namespace content 77 } // namespace content
76 78
77 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ 79 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698