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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // anything else. When the view is live, these messages are forwarded to it by | 102 // anything else. When the view is live, these messages are forwarded to it by |
103 // the RenderWidgetHost's IPC message map. | 103 // the RenderWidgetHost's IPC message map. |
104 class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { | 104 class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { |
105 public: | 105 public: |
106 // Returns the RenderWidgetHost given its ID and the ID of its render process. | 106 // Returns the RenderWidgetHost given its ID and the ID of its render process. |
107 // Returns nullptr if the IDs do not correspond to a live RenderWidgetHost. | 107 // Returns nullptr if the IDs do not correspond to a live RenderWidgetHost. |
108 static RenderWidgetHost* FromID(int32_t process_id, int32_t routing_id); | 108 static RenderWidgetHost* FromID(int32_t process_id, int32_t routing_id); |
109 | 109 |
110 // Returns an iterator to iterate over the global list of active render widget | 110 // Returns an iterator to iterate over the global list of active render widget |
111 // hosts. | 111 // hosts. |
112 static scoped_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); | 112 static std::unique_ptr<RenderWidgetHostIterator> GetRenderWidgetHosts(); |
113 | 113 |
114 ~RenderWidgetHost() override {} | 114 ~RenderWidgetHost() override {} |
115 | 115 |
116 // Update the text direction of the focused input element and notify it to a | 116 // Update the text direction of the focused input element and notify it to a |
117 // renderer process. | 117 // renderer process. |
118 // These functions have two usage scenarios: changing the text direction | 118 // These functions have two usage scenarios: changing the text direction |
119 // from a menu (as Safari does), and; changing the text direction when a user | 119 // from a menu (as Safari does), and; changing the text direction when a user |
120 // presses a set of keys (as IE and Firefox do). | 120 // presses a set of keys (as IE and Firefox do). |
121 // 1. Change the text direction from a menu. | 121 // 1. Change the text direction from a menu. |
122 // In this scenario, we receive a menu event only once and we should update | 122 // In this scenario, we receive a menu event only once and we should update |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // Get the color profile corresponding to this render widget. | 244 // Get the color profile corresponding to this render widget. |
245 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; | 245 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; |
246 | 246 |
247 // Sends a compositor proto to the render widget. | 247 // Sends a compositor proto to the render widget. |
248 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; | 248 virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; |
249 }; | 249 }; |
250 | 250 |
251 } // namespace content | 251 } // namespace content |
252 | 252 |
253 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 253 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |