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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 virtual SiteInstance* GetSiteInstance() const OVERRIDE; | 197 virtual SiteInstance* GetSiteInstance() const OVERRIDE; |
198 virtual bool IsRenderViewLive() const OVERRIDE; | 198 virtual bool IsRenderViewLive() const OVERRIDE; |
199 virtual void NotifyMoveOrResizeStarted() OVERRIDE; | 199 virtual void NotifyMoveOrResizeStarted() OVERRIDE; |
200 virtual void SetWebUIProperty(const std::string& name, | 200 virtual void SetWebUIProperty(const std::string& name, |
201 const std::string& value) OVERRIDE; | 201 const std::string& value) OVERRIDE; |
202 virtual void Zoom(PageZoom zoom) OVERRIDE; | 202 virtual void Zoom(PageZoom zoom) OVERRIDE; |
203 virtual void SyncRendererPrefs() OVERRIDE; | 203 virtual void SyncRendererPrefs() OVERRIDE; |
204 virtual WebPreferences GetWebkitPreferences() OVERRIDE; | 204 virtual WebPreferences GetWebkitPreferences() OVERRIDE; |
205 virtual void UpdateWebkitPreferences( | 205 virtual void UpdateWebkitPreferences( |
206 const WebPreferences& prefs) OVERRIDE; | 206 const WebPreferences& prefs) OVERRIDE; |
| 207 virtual void OnWebkitPreferencesChanged() OVERRIDE; |
207 virtual void GetAudioOutputControllers( | 208 virtual void GetAudioOutputControllers( |
208 const GetAudioOutputControllersCallback& callback) const OVERRIDE; | 209 const GetAudioOutputControllersCallback& callback) const OVERRIDE; |
209 virtual void SelectWordAroundCaret() OVERRIDE; | 210 virtual void SelectWordAroundCaret() OVERRIDE; |
210 | 211 |
211 #if defined(OS_ANDROID) | 212 #if defined(OS_ANDROID) |
212 virtual void ActivateNearestFindResult(int request_id, | 213 virtual void ActivateNearestFindResult(int request_id, |
213 float x, | 214 float x, |
214 float y) OVERRIDE; | 215 float y) OVERRIDE; |
215 virtual void RequestFindMatchRects(int current_version) OVERRIDE; | 216 virtual void RequestFindMatchRects(int current_version) OVERRIDE; |
216 #endif | 217 #endif |
(...skipping 17 matching lines...) Expand all Loading... |
234 int opener_route_id, | 235 int opener_route_id, |
235 int proxy_route_id, | 236 int proxy_route_id, |
236 int32 max_page_id, | 237 int32 max_page_id, |
237 bool window_was_created_with_opener); | 238 bool window_was_created_with_opener); |
238 | 239 |
239 base::TerminationStatus render_view_termination_status() const { | 240 base::TerminationStatus render_view_termination_status() const { |
240 return render_view_termination_status_; | 241 return render_view_termination_status_; |
241 } | 242 } |
242 | 243 |
243 // Returns the content specific prefs for this RenderViewHost. | 244 // Returns the content specific prefs for this RenderViewHost. |
244 WebPreferences GetWebkitPrefs(const GURL& url); | 245 WebPreferences ComputeWebkitPrefs(const GURL& url); |
245 | 246 |
246 // Sends the given navigation message. Use this rather than sending it | 247 // Sends the given navigation message. Use this rather than sending it |
247 // yourself since this does the internal bookkeeping described below. This | 248 // yourself since this does the internal bookkeeping described below. This |
248 // function takes ownership of the provided message pointer. | 249 // function takes ownership of the provided message pointer. |
249 // | 250 // |
250 // If a cross-site request is in progress, we may be suspended while waiting | 251 // If a cross-site request is in progress, we may be suspended while waiting |
251 // for the onbeforeunload handler, so this function might buffer the message | 252 // for the onbeforeunload handler, so this function might buffer the message |
252 // rather than sending it. | 253 // rather than sending it. |
253 // TODO(nasko): Remove this method once all callers are converted to use | 254 // TODO(nasko): Remove this method once all callers are converted to use |
254 // RenderFrameHostImpl. | 255 // RenderFrameHostImpl. |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 // Called after receiving the SwapOutACK when the RVH is in state pending | 601 // Called after receiving the SwapOutACK when the RVH is in state pending |
601 // shutdown. Also called if the unload timer times out. | 602 // shutdown. Also called if the unload timer times out. |
602 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. | 603 // TODO(nasko): Move to RenderFrameHost, as this is per-frame state. |
603 base::Closure pending_shutdown_on_swap_out_; | 604 base::Closure pending_shutdown_on_swap_out_; |
604 | 605 |
605 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | 606 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; |
606 | 607 |
607 // True if the current focused element is editable. | 608 // True if the current focused element is editable. |
608 bool is_focused_element_editable_; | 609 bool is_focused_element_editable_; |
609 | 610 |
| 611 // This is updated every time UpdateWebkitPreferences is called. That method |
| 612 // is in turn called when any of the settings change that the WebPreferences |
| 613 // values depend on. |
| 614 scoped_ptr<WebPreferences> web_preferences_; |
| 615 |
610 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 616 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
611 }; | 617 }; |
612 | 618 |
613 #if defined(COMPILER_MSVC) | 619 #if defined(COMPILER_MSVC) |
614 #pragma warning(pop) | 620 #pragma warning(pop) |
615 #endif | 621 #endif |
616 | 622 |
617 } // namespace content | 623 } // namespace content |
618 | 624 |
619 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 625 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |