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/callback.h" | 10 #include "base/callback.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/drag_event_source_info.h" | 13 #include "content/common/drag_event_source_info.h" |
| 14 #include "content/common/features.h" |
14 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 15 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
15 | 16 |
16 namespace gfx { | 17 namespace gfx { |
17 class ImageSkia; | 18 class ImageSkia; |
18 class Rect; | 19 class Rect; |
19 class Vector2d; | 20 class Vector2d; |
20 } | 21 } |
21 | 22 |
22 #if defined(OS_ANDROID) | 23 #if defined(OS_ANDROID) |
23 namespace ui { | 24 namespace ui { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual void UpdateDragCursor(blink::WebDragOperation operation) {} | 59 virtual void UpdateDragCursor(blink::WebDragOperation operation) {} |
59 | 60 |
60 // Notification that view for this delegate got the focus. | 61 // Notification that view for this delegate got the focus. |
61 virtual void GotFocus() {} | 62 virtual void GotFocus() {} |
62 | 63 |
63 // Callback to inform the browser that the page is returning the focus to | 64 // Callback to inform the browser that the page is returning the focus to |
64 // the browser's chrome. If reverse is true, it means the focus was | 65 // the browser's chrome. If reverse is true, it means the focus was |
65 // retrieved by doing a Shift-Tab. | 66 // retrieved by doing a Shift-Tab. |
66 virtual void TakeFocus(bool reverse) {} | 67 virtual void TakeFocus(bool reverse) {} |
67 | 68 |
68 #if defined(USE_EXTERNAL_POPUP_MENU) | 69 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
69 // Shows a popup menu with the specified items. | 70 // Shows a popup menu with the specified items. |
70 // This method should call RenderFrameHost::DidSelectPopupMenuItem[s]() or | 71 // This method should call RenderFrameHost::DidSelectPopupMenuItem[s]() or |
71 // RenderFrameHost::DidCancelPopupMenu() based on the user action. | 72 // RenderFrameHost::DidCancelPopupMenu() based on the user action. |
72 virtual void ShowPopupMenu(RenderFrameHost* render_frame_host, | 73 virtual void ShowPopupMenu(RenderFrameHost* render_frame_host, |
73 const gfx::Rect& bounds, | 74 const gfx::Rect& bounds, |
74 int item_height, | 75 int item_height, |
75 double item_font_size, | 76 double item_font_size, |
76 int selected_item, | 77 int selected_item, |
77 const std::vector<MenuItem>& items, | 78 const std::vector<MenuItem>& items, |
78 bool right_aligned, | 79 bool right_aligned, |
79 bool allow_multiple_selection) {}; | 80 bool allow_multiple_selection) {}; |
80 | 81 |
81 // Hides a popup menu opened by ShowPopupMenu(). | 82 // Hides a popup menu opened by ShowPopupMenu(). |
82 virtual void HidePopupMenu() {}; | 83 virtual void HidePopupMenu() {}; |
83 #endif | 84 #endif |
84 | 85 |
85 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
86 virtual ui::OverscrollRefreshHandler* GetOverscrollRefreshHandler() const; | 87 virtual ui::OverscrollRefreshHandler* GetOverscrollRefreshHandler() const; |
87 #endif | 88 #endif |
88 | 89 |
89 protected: | 90 protected: |
90 virtual ~RenderViewHostDelegateView() {} | 91 virtual ~RenderViewHostDelegateView() {} |
91 }; | 92 }; |
92 | 93 |
93 } // namespace content | 94 } // namespace content |
94 | 95 |
95 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ | 96 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_VIEW_H_ |
OLD | NEW |