Chromium Code Reviews| 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 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 // like loading pages, adjusting the display and other browser functionality, | 45 // like loading pages, adjusting the display and other browser functionality, |
| 46 // which it translates into IPC messages sent over the IPC channel with the | 46 // which it translates into IPC messages sent over the IPC channel with the |
| 47 // RenderView. It responds to all IPC messages sent by that RenderView and | 47 // RenderView. It responds to all IPC messages sent by that RenderView and |
| 48 // cracks them, calling a delegate object back with higher level types where | 48 // cracks them, calling a delegate object back with higher level types where |
| 49 // possible. | 49 // possible. |
| 50 // | 50 // |
| 51 // The intent of this interface is to provide a view-agnostic communication | 51 // The intent of this interface is to provide a view-agnostic communication |
| 52 // conduit with a renderer. This is so we can build HTML views not only as | 52 // conduit with a renderer. This is so we can build HTML views not only as |
| 53 // WebContents (see WebContents for an example) but also as views, etc. | 53 // WebContents (see WebContents for an example) but also as views, etc. |
| 54 // | 54 // |
| 55 // DEPRECATED: RenderViewHost is being removed as part of the SiteIsolation | 55 // DEPRECATED: RenderViewHost is being removed as part of the SiteIsolation |
|
Charlie Reis
2015/07/06 21:30:40
This class is deprecated because it doesn't suppor
| |
| 56 // project. New code should not be added here, but to either RenderFrameHost | 56 // project. New code should not be added here, but to either RenderFrameHost |
| 57 // (if frame specific) or WebContents (if page specific). | 57 // (if frame specific) or WebContents (if page specific). |
| 58 // | 58 // |
| 59 // For context, please see https://crbug.com/467770 and | 59 // For context, please see https://crbug.com/467770 and |
| 60 // http://www.chromium.org/developers/design-documents/site-isolation. | 60 // http://www.chromium.org/developers/design-documents/site-isolation. |
| 61 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { | 61 class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { |
| 62 public: | 62 public: |
| 63 // Returns the RenderViewHost given its ID and the ID of its render process. | 63 // Returns the RenderViewHost given its ID and the ID of its render process. |
| 64 // Returns nullptr if the IDs do not correspond to a live RenderViewHost. | 64 // Returns nullptr if the IDs do not correspond to a live RenderViewHost. |
| 65 static RenderViewHost* FromID(int render_process_id, int render_view_id); | 65 static RenderViewHost* FromID(int render_process_id, int render_view_id); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 // If any state that affects the webkit preferences changed, this method must | 190 // If any state that affects the webkit preferences changed, this method must |
| 191 // be called. This triggers recomputing preferences. | 191 // be called. This triggers recomputing preferences. |
| 192 virtual void OnWebkitPreferencesChanged() = 0; | 192 virtual void OnWebkitPreferencesChanged() = 0; |
| 193 | 193 |
| 194 // Passes a list of Webkit preferences to the renderer. | 194 // Passes a list of Webkit preferences to the renderer. |
| 195 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; | 195 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; |
| 196 | 196 |
| 197 // Notify the render view host to select the word around the caret. | 197 // Notify the render view host to select the word around the caret. |
| 198 virtual void SelectWordAroundCaret() = 0; | 198 virtual void SelectWordAroundCaret() = 0; |
| 199 | 199 |
| 200 // Notify the render view host to adjust the expand selection by the given | |
| 201 // amounts. | |
| 202 virtual void ExpandSelectionByCharacterOffset(int start_adjust, | |
| 203 int end_adjust) = 0; | |
|
Charlie Reis
2015/07/06 21:30:41
Is it possible for this to cross a frame boundary?
| |
| 204 | |
| 200 #if defined(OS_ANDROID) | 205 #if defined(OS_ANDROID) |
| 201 // Selects and zooms to the find result nearest to the point (x,y) | 206 // Selects and zooms to the find result nearest to the point (x,y) |
| 202 // defined in find-in-page coordinates. | 207 // defined in find-in-page coordinates. |
| 203 virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0; | 208 virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0; |
| 204 | 209 |
| 205 // Asks the renderer to send the rects of the current find matches. | 210 // Asks the renderer to send the rects of the current find matches. |
| 206 virtual void RequestFindMatchRects(int current_version) = 0; | 211 virtual void RequestFindMatchRects(int current_version) = 0; |
| 207 #endif | 212 #endif |
| 208 | 213 |
| 209 private: | 214 private: |
| 210 // This interface should only be implemented inside content. | 215 // This interface should only be implemented inside content. |
| 211 friend class RenderViewHostImpl; | 216 friend class RenderViewHostImpl; |
| 212 RenderViewHost() {} | 217 RenderViewHost() {} |
| 213 }; | 218 }; |
| 214 | 219 |
| 215 } // namespace content | 220 } // namespace content |
| 216 | 221 |
| 217 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 222 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
| OLD | NEW |