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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_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 "base/callback.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 #include "content/common/drag_event_source_info.h" | 13 #include "content/common/drag_event_source_info.h" |
13 #include "third_party/WebKit/public/web/WebDragOperation.h" | 14 #include "third_party/WebKit/public/web/WebDragOperation.h" |
14 | 15 |
15 class SkBitmap; | 16 class SkBitmap; |
16 | 17 |
17 namespace gfx { | 18 namespace gfx { |
18 class ImageSkia; | 19 class ImageSkia; |
19 class Rect; | 20 class Rect; |
20 class Vector2d; | 21 class Vector2d; |
21 } | 22 } |
22 | 23 |
| 24 namespace ui { |
| 25 class GestureEvent; |
| 26 class MouseEvent; |
| 27 } |
| 28 |
23 namespace content { | 29 namespace content { |
24 class RenderFrameHost; | 30 class RenderFrameHost; |
25 struct ContextMenuParams; | 31 struct ContextMenuParams; |
26 struct DropData; | 32 struct DropData; |
27 struct MenuItem; | 33 struct MenuItem; |
28 | 34 |
29 // This class provides a way for the RenderViewHost to reach out to its | 35 // 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 | 36 // delegate's view. It only needs to be implemented by embedders if they don't |
31 // use the default WebContentsView implementations. | 37 // use the default WebContentsView implementations. |
32 class CONTENT_EXPORT RenderViewHostDelegateView { | 38 class CONTENT_EXPORT RenderViewHostDelegateView { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 double item_font_size, | 75 double item_font_size, |
70 int selected_item, | 76 int selected_item, |
71 const std::vector<MenuItem>& items, | 77 const std::vector<MenuItem>& items, |
72 bool right_aligned, | 78 bool right_aligned, |
73 bool allow_multiple_selection) {}; | 79 bool allow_multiple_selection) {}; |
74 | 80 |
75 // Hides a popup menu opened by ShowPopupMenu(). | 81 // Hides a popup menu opened by ShowPopupMenu(). |
76 virtual void HidePopupMenu() {}; | 82 virtual void HidePopupMenu() {}; |
77 #endif | 83 #endif |
78 | 84 |
| 85 #if defined(TOOLKIT_VIEWS) |
| 86 // Shows a Link Disambiguation Popup. |target_rect| is the area the user |
| 87 // touched that resulted in ambiguity, in DIPs in the host's coordinate |
| 88 // system, |zoomed_bitmap| is an enlarged image of that |target_rect|, and |
| 89 // |callback| is for forwarding on to the original scale web content. |
| 90 virtual void ShowDisambiguationPopup( |
| 91 const gfx::Rect& target_rect, |
| 92 const SkBitmap& zoomed_bitmap, |
| 93 const base::Callback<void(ui::GestureEvent*)>& gesture_cb, |
| 94 const base::Callback<void(ui::MouseEvent*)>& mouse_cb) {} |
| 95 |
| 96 // Hides the Link Disambiguation Popup, if it was showing, otherwise does |
| 97 // nothing. |
| 98 virtual void HideDisambiguationPopup() {} |
| 99 #endif |
| 100 |
79 protected: | 101 protected: |
80 virtual ~RenderViewHostDelegateView() {} | 102 virtual ~RenderViewHostDelegateView() {} |
81 }; | 103 }; |
82 | 104 |
83 } // namespace content | 105 } // namespace content |
84 | 106 |
85 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ | 107 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ |
OLD | NEW |