| 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_VIEW_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // A RenderViewHost is responsible for creating and talking to a RenderView | 39 // A RenderViewHost is responsible for creating and talking to a RenderView |
| 40 // object in a child process. It exposes a high level API to users, for things | 40 // object in a child process. It exposes a high level API to users, for things |
| 41 // like loading pages, adjusting the display and other browser functionality, | 41 // like loading pages, adjusting the display and other browser functionality, |
| 42 // which it translates into IPC messages sent over the IPC channel with the | 42 // which it translates into IPC messages sent over the IPC channel with the |
| 43 // RenderView. It responds to all IPC messages sent by that RenderView and | 43 // RenderView. It responds to all IPC messages sent by that RenderView and |
| 44 // cracks them, calling a delegate object back with higher level types where | 44 // cracks them, calling a delegate object back with higher level types where |
| 45 // possible. | 45 // possible. |
| 46 // | 46 // |
| 47 // The intent of this interface is to provide a view-agnostic communication | 47 // The intent of this interface is to provide a view-agnostic communication |
| 48 // conduit with a renderer. This is so we can build HTML views not only as | 48 // conduit with a renderer. This is so we can build HTML views not only as |
| 49 // TabContents (see TabContents for an example) but also as views, etc. | 49 // WebContents (see WebContents for an example) but also as views, etc. |
| 50 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { | 50 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { |
| 51 public: | 51 public: |
| 52 // Returns the RenderViewHost given its ID and the ID of its render process. | 52 // Returns the RenderViewHost given its ID and the ID of its render process. |
| 53 // Returns NULL if the IDs do not correspond to a live RenderViewHost. | 53 // Returns NULL if the IDs do not correspond to a live RenderViewHost. |
| 54 static RenderViewHost* FromID(int render_process_id, int render_view_id); | 54 static RenderViewHost* FromID(int render_process_id, int render_view_id); |
| 55 | 55 |
| 56 // Downcasts from a RenderWidgetHost to a RenderViewHost. Required | 56 // Downcasts from a RenderWidgetHost to a RenderViewHost. Required |
| 57 // because RenderWidgetHost is a virtual base class. | 57 // because RenderWidgetHost is a virtual base class. |
| 58 static RenderViewHost* From(RenderWidgetHost* rwh); | 58 static RenderViewHost* From(RenderWidgetHost* rwh); |
| 59 | 59 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 virtual void ToggleSpeechInput() = 0; | 246 virtual void ToggleSpeechInput() = 0; |
| 247 | 247 |
| 248 // Passes a list of Webkit preferences to the renderer. | 248 // Passes a list of Webkit preferences to the renderer. |
| 249 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; | 249 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace content | 252 } // namespace content |
| 253 | 253 |
| 254 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 254 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
| OLD | NEW |