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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Returns NULL if the IDs do not correspond to a live RenderWidgetHost. | 117 // Returns NULL if the IDs do not correspond to a live RenderWidgetHost. |
118 static RenderWidgetHost* FromID(int32 process_id, int32 routing_id); | 118 static RenderWidgetHost* FromID(int32 process_id, int32 routing_id); |
119 | 119 |
120 // Returns an iterator to iterate over the global list of active render widget | 120 // Returns an iterator to iterate over the global list of active render widget |
121 // hosts. | 121 // hosts. |
122 static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); | 122 static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); |
123 | 123 |
124 virtual ~RenderWidgetHost() {} | 124 virtual ~RenderWidgetHost() {} |
125 | 125 |
126 // Edit operations. | 126 // Edit operations. |
| 127 // TODO(jam): move the rest of these to RenderFrameHost |
127 virtual void Undo() = 0; | 128 virtual void Undo() = 0; |
128 virtual void Redo() = 0; | 129 virtual void Redo() = 0; |
129 virtual void Cut() = 0; | |
130 virtual void Copy() = 0; | |
131 virtual void CopyToFindPboard() = 0; | 130 virtual void CopyToFindPboard() = 0; |
132 virtual void Paste() = 0; | |
133 virtual void PasteAndMatchStyle() = 0; | 131 virtual void PasteAndMatchStyle() = 0; |
134 virtual void Delete() = 0; | 132 virtual void Delete() = 0; |
135 virtual void SelectAll() = 0; | 133 virtual void SelectAll() = 0; |
136 virtual void Unselect() = 0; | 134 virtual void Unselect() = 0; |
137 | 135 |
138 // Update the text direction of the focused input element and notify it to a | 136 // Update the text direction of the focused input element and notify it to a |
139 // renderer process. | 137 // renderer process. |
140 // These functions have two usage scenarios: changing the text direction | 138 // These functions have two usage scenarios: changing the text direction |
141 // from a menu (as Safari does), and; changing the text direction when a user | 139 // from a menu (as Safari does), and; changing the text direction when a user |
142 // presses a set of keys (as IE and Firefox do). | 140 // presses a set of keys (as IE and Firefox do). |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // within content/. This method is necessary because | 301 // within content/. This method is necessary because |
304 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 302 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
305 // subclasses inherit it virtually, which removes our ability to | 303 // subclasses inherit it virtually, which removes our ability to |
306 // static_cast to the subclass. | 304 // static_cast to the subclass. |
307 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 305 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
308 }; | 306 }; |
309 | 307 |
310 } // namespace content | 308 } // namespace content |
311 | 309 |
312 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 310 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |