| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { | 107 class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { |
| 108 public: | 108 public: |
| 109 // Returns the RenderWidgetHost given its ID and the ID of its render process. | 109 // Returns the RenderWidgetHost given its ID and the ID of its render process. |
| 110 // Returns NULL if the IDs do not correspond to a live RenderWidgetHost. | 110 // Returns NULL if the IDs do not correspond to a live RenderWidgetHost. |
| 111 static RenderWidgetHost* FromID(int32 process_id, int32 routing_id); | 111 static RenderWidgetHost* FromID(int32 process_id, int32 routing_id); |
| 112 | 112 |
| 113 // Returns an iterator to iterate over the global list of active render widget | 113 // Returns an iterator to iterate over the global list of active render widget |
| 114 // hosts. | 114 // hosts. |
| 115 static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); | 115 static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); |
| 116 | 116 |
| 117 virtual ~RenderWidgetHost() {} | 117 ~RenderWidgetHost() override {} |
| 118 | 118 |
| 119 // Update the text direction of the focused input element and notify it to a | 119 // Update the text direction of the focused input element and notify it to a |
| 120 // renderer process. | 120 // renderer process. |
| 121 // These functions have two usage scenarios: changing the text direction | 121 // These functions have two usage scenarios: changing the text direction |
| 122 // from a menu (as Safari does), and; changing the text direction when a user | 122 // from a menu (as Safari does), and; changing the text direction when a user |
| 123 // presses a set of keys (as IE and Firefox do). | 123 // presses a set of keys (as IE and Firefox do). |
| 124 // 1. Change the text direction from a menu. | 124 // 1. Change the text direction from a menu. |
| 125 // In this scenario, we receive a menu event only once and we should update | 125 // In this scenario, we receive a menu event only once and we should update |
| 126 // the text direction immediately when a user chooses a menu item. So, we | 126 // the text direction immediately when a user chooses a menu item. So, we |
| 127 // should call both functions at once as listed in the following snippet. | 127 // should call both functions at once as listed in the following snippet. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // within content/. This method is necessary because | 258 // within content/. This method is necessary because |
| 259 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 259 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 260 // subclasses inherit it virtually, which removes our ability to | 260 // subclasses inherit it virtually, which removes our ability to |
| 261 // static_cast to the subclass. | 261 // static_cast to the subclass. |
| 262 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 262 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace content | 265 } // namespace content |
| 266 | 266 |
| 267 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 267 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |