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 <list> | |
9 | |
10 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
11 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
12 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
13 #include "content/public/common/file_chooser_params.h" | 11 #include "content/public/common/file_chooser_params.h" |
14 #include "content/public/common/page_zoom.h" | 12 #include "content/public/common/page_zoom.h" |
15 #include "third_party/WebKit/public/web/WebDragOperation.h" | 13 #include "third_party/WebKit/public/web/WebDragOperation.h" |
16 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 14 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" |
17 | 15 |
18 class GURL; | 16 class GURL; |
19 | 17 |
20 namespace base { | 18 namespace base { |
21 class FilePath; | 19 class FilePath; |
22 class Value; | 20 class Value; |
23 } | 21 } |
24 | 22 |
25 namespace blink { | 23 namespace blink { |
26 struct WebMediaPlayerAction; | 24 struct WebMediaPlayerAction; |
27 struct WebPluginAction; | 25 struct WebPluginAction; |
28 } | 26 } |
29 | 27 |
30 namespace gfx { | 28 namespace gfx { |
31 class Point; | 29 class Point; |
32 } | 30 } |
33 | 31 |
34 namespace media { | |
35 class AudioOutputController; | |
36 } | |
37 | |
38 namespace content { | 32 namespace content { |
39 | 33 |
40 class ChildProcessSecurityPolicy; | 34 class ChildProcessSecurityPolicy; |
41 class RenderFrameHost; | 35 class RenderFrameHost; |
42 class RenderViewHostDelegate; | 36 class RenderViewHostDelegate; |
43 class SessionStorageNamespace; | 37 class SessionStorageNamespace; |
44 class SiteInstance; | 38 class SiteInstance; |
45 struct DropData; | 39 struct DropData; |
46 struct FileChooserFileInfo; | 40 struct FileChooserFileInfo; |
47 struct WebPreferences; | 41 struct WebPreferences; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // this lookup will be fast | 186 // this lookup will be fast |
193 virtual WebPreferences GetWebkitPreferences() = 0; | 187 virtual WebPreferences GetWebkitPreferences() = 0; |
194 | 188 |
195 // If any state that affects the webkit preferences changed, this method must | 189 // If any state that affects the webkit preferences changed, this method must |
196 // be called. This triggers recomputing preferences. | 190 // be called. This triggers recomputing preferences. |
197 virtual void OnWebkitPreferencesChanged() = 0; | 191 virtual void OnWebkitPreferencesChanged() = 0; |
198 | 192 |
199 // Passes a list of Webkit preferences to the renderer. | 193 // Passes a list of Webkit preferences to the renderer. |
200 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; | 194 virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; |
201 | 195 |
202 // Retrieves the list of AudioOutputController objects associated | |
203 // with this object and passes it to the callback you specify, on | |
204 // the same thread on which you called the method. | |
205 typedef std::list<scoped_refptr<media::AudioOutputController> > | |
206 AudioOutputControllerList; | |
207 typedef base::Callback<void(const AudioOutputControllerList&)> | |
208 GetAudioOutputControllersCallback; | |
209 virtual void GetAudioOutputControllers( | |
210 const GetAudioOutputControllersCallback& callback) const = 0; | |
211 | |
212 // Notify the render view host to select the word around the caret. | 196 // Notify the render view host to select the word around the caret. |
213 virtual void SelectWordAroundCaret() = 0; | 197 virtual void SelectWordAroundCaret() = 0; |
214 | 198 |
215 #if defined(OS_ANDROID) | 199 #if defined(OS_ANDROID) |
216 // Selects and zooms to the find result nearest to the point (x,y) | 200 // Selects and zooms to the find result nearest to the point (x,y) |
217 // defined in find-in-page coordinates. | 201 // defined in find-in-page coordinates. |
218 virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0; | 202 virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0; |
219 | 203 |
220 // Asks the renderer to send the rects of the current find matches. | 204 // Asks the renderer to send the rects of the current find matches. |
221 virtual void RequestFindMatchRects(int current_version) = 0; | 205 virtual void RequestFindMatchRects(int current_version) = 0; |
222 #endif | 206 #endif |
223 | 207 |
224 private: | 208 private: |
225 // This interface should only be implemented inside content. | 209 // This interface should only be implemented inside content. |
226 friend class RenderViewHostImpl; | 210 friend class RenderViewHostImpl; |
227 RenderViewHost() {} | 211 RenderViewHost() {} |
228 }; | 212 }; |
229 | 213 |
230 } // namespace content | 214 } // namespace content |
231 | 215 |
232 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 216 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
OLD | NEW |