| OLD | NEW |
| 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 struct ContextMenuParams; | 27 struct ContextMenuParams; |
| 28 | 28 |
| 29 // 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 |
| 30 // 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 |
| 31 // use the default WebContentsView implementations. | 31 // use the default WebContentsView implementations. |
| 32 class CONTENT_EXPORT RenderViewHostDelegateView { | 32 class CONTENT_EXPORT RenderViewHostDelegateView { |
| 33 public: | 33 public: |
| 34 // 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 |
| 35 // provided in the supplied params. | 35 // provided in the supplied params. |
| 36 virtual void ShowContextMenu(const ContextMenuParams& params, | 36 virtual void ShowContextMenu(const ContextMenuParams& params, |
| 37 const ContextMenuSourceType& type) {} | 37 ContextMenuSourceType type) {} |
| 38 | 38 |
| 39 // Shows a popup menu with the specified items. | 39 // Shows a popup menu with the specified items. |
| 40 // This method should call RenderViewHost::DidSelectPopupMenuItem[s]() or | 40 // This method should call RenderViewHost::DidSelectPopupMenuItem[s]() or |
| 41 // RenderViewHost::DidCancelPopupMenu() based on the user action. | 41 // RenderViewHost::DidCancelPopupMenu() based on the user action. |
| 42 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 42 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 43 int item_height, | 43 int item_height, |
| 44 double item_font_size, | 44 double item_font_size, |
| 45 int selected_item, | 45 int selected_item, |
| 46 const std::vector<WebMenuItem>& items, | 46 const std::vector<WebMenuItem>& items, |
| 47 bool right_aligned, | 47 bool right_aligned, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 // retrieved by doing a Shift-Tab. | 67 // retrieved by doing a Shift-Tab. |
| 68 virtual void TakeFocus(bool reverse) {} | 68 virtual void TakeFocus(bool reverse) {} |
| 69 | 69 |
| 70 protected: | 70 protected: |
| 71 virtual ~RenderViewHostDelegateView() {} | 71 virtual ~RenderViewHostDelegateView() {} |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace content | 74 } // namespace content |
| 75 | 75 |
| 76 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ | 76 #endif // CONTENT_PORT_BROWSER_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ |
| OLD | NEW |