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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 virtual RenderViewHostDelegate* GetDelegate() const OVERRIDE; | 202 virtual RenderViewHostDelegate* GetDelegate() const OVERRIDE; |
203 virtual int GetEnabledBindings() const OVERRIDE; | 203 virtual int GetEnabledBindings() const OVERRIDE; |
204 virtual SiteInstance* GetSiteInstance() const OVERRIDE; | 204 virtual SiteInstance* GetSiteInstance() const OVERRIDE; |
205 virtual void InsertCSS(const string16& frame_xpath, | 205 virtual void InsertCSS(const string16& frame_xpath, |
206 const std::string& css) OVERRIDE; | 206 const std::string& css) OVERRIDE; |
207 virtual bool IsRenderViewLive() const OVERRIDE; | 207 virtual bool IsRenderViewLive() const OVERRIDE; |
208 virtual void NotifyContextMenuClosed( | 208 virtual void NotifyContextMenuClosed( |
209 const CustomContextMenuContext& context) OVERRIDE; | 209 const CustomContextMenuContext& context) OVERRIDE; |
210 virtual void NotifyMoveOrResizeStarted() OVERRIDE; | 210 virtual void NotifyMoveOrResizeStarted() OVERRIDE; |
211 virtual void ReloadFrame() OVERRIDE; | 211 virtual void ReloadFrame() OVERRIDE; |
212 virtual const std::string& GetFrameTree() OVERRIDE; | |
212 virtual void SetAltErrorPageURL(const GURL& url) OVERRIDE; | 213 virtual void SetAltErrorPageURL(const GURL& url) OVERRIDE; |
213 virtual void SetWebUIProperty(const std::string& name, | 214 virtual void SetWebUIProperty(const std::string& name, |
214 const std::string& value) OVERRIDE; | 215 const std::string& value) OVERRIDE; |
215 virtual void SetZoomLevel(double level) OVERRIDE; | 216 virtual void SetZoomLevel(double level) OVERRIDE; |
216 virtual void Zoom(PageZoom zoom) OVERRIDE; | 217 virtual void Zoom(PageZoom zoom) OVERRIDE; |
217 virtual void SyncRendererPrefs() OVERRIDE; | 218 virtual void SyncRendererPrefs() OVERRIDE; |
218 virtual void ToggleSpeechInput() OVERRIDE; | 219 virtual void ToggleSpeechInput() OVERRIDE; |
219 virtual webkit_glue::WebPreferences GetWebkitPreferences() OVERRIDE; | 220 virtual webkit_glue::WebPreferences GetWebkitPreferences() OVERRIDE; |
220 virtual void UpdateWebkitPreferences( | 221 virtual void UpdateWebkitPreferences( |
221 const webkit_glue::WebPreferences& prefs) OVERRIDE; | 222 const webkit_glue::WebPreferences& prefs) OVERRIDE; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 void SendOrientationChangeEvent(int orientation); | 395 void SendOrientationChangeEvent(int orientation); |
395 | 396 |
396 void set_save_accessibility_tree_for_testing(bool save) { | 397 void set_save_accessibility_tree_for_testing(bool save) { |
397 save_accessibility_tree_for_testing_ = save; | 398 save_accessibility_tree_for_testing_ = save; |
398 } | 399 } |
399 | 400 |
400 void set_send_accessibility_updated_notifications(bool send) { | 401 void set_send_accessibility_updated_notifications(bool send) { |
401 send_accessibility_updated_notifications_ = send; | 402 send_accessibility_updated_notifications_ = send; |
402 } | 403 } |
403 | 404 |
405 // Updates the frame tree for this RVH and sends an IPC down to the renderer | |
406 // process to keep them in sync. | |
407 void UpdateFrameTree(int process_id, | |
awong
2012/08/20 21:56:31
Note, move this up to under SendOrientatinChangeEv
nasko
2012/08/21 00:34:45
Done.
| |
408 int route_id, | |
409 const std::string& frame_tree); | |
410 | |
404 const AccessibilityNodeData& accessibility_tree_for_testing() { | 411 const AccessibilityNodeData& accessibility_tree_for_testing() { |
405 return accessibility_tree_; | 412 return accessibility_tree_; |
406 } | 413 } |
407 | 414 |
408 bool is_waiting_for_unload_ack_for_testing() { | 415 bool is_waiting_for_unload_ack_for_testing() { |
409 return is_waiting_for_unload_ack_; | 416 return is_waiting_for_unload_ack_; |
410 } | 417 } |
411 | 418 |
412 // Checks that the given renderer can request |url|, if not it sets it to | 419 // Checks that the given renderer can request |url|, if not it sets it to |
413 // about:blank. | 420 // about:blank. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 bool has_audio, | 542 bool has_audio, |
536 bool is_playing); | 543 bool is_playing); |
537 void OnRequestDesktopNotificationPermission(const GURL& origin, | 544 void OnRequestDesktopNotificationPermission(const GURL& origin, |
538 int callback_id); | 545 int callback_id); |
539 void OnShowDesktopNotification( | 546 void OnShowDesktopNotification( |
540 const ShowDesktopNotificationHostMsgParams& params); | 547 const ShowDesktopNotificationHostMsgParams& params); |
541 void OnCancelDesktopNotification(int notification_id); | 548 void OnCancelDesktopNotification(int notification_id); |
542 void OnRunFileChooser(const FileChooserParams& params); | 549 void OnRunFileChooser(const FileChooserParams& params); |
543 void OnDomOperationResponse(const std::string& json_string, | 550 void OnDomOperationResponse(const std::string& json_string, |
544 int automation_id); | 551 int automation_id); |
552 void OnFrameTree(const std::string& frame_tree); | |
545 | 553 |
546 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 554 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
547 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 555 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
548 #endif | 556 #endif |
549 | 557 |
550 #if defined(OS_ANDROID) | 558 #if defined(OS_ANDROID) |
551 void OnStartContentIntent(const GURL& content_url); | 559 void OnStartContentIntent(const GURL& content_url); |
552 #endif | 560 #endif |
553 | 561 |
554 private: | 562 private: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
630 // The session storage namespace to be used by the associated render view. | 638 // The session storage namespace to be used by the associated render view. |
631 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; | 639 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; |
632 | 640 |
633 // Whether the accessibility tree should be saved, for unit testing. | 641 // Whether the accessibility tree should be saved, for unit testing. |
634 bool save_accessibility_tree_for_testing_; | 642 bool save_accessibility_tree_for_testing_; |
635 | 643 |
636 // Whether accessibility notifications are sent for all WebKit notifications | 644 // Whether accessibility notifications are sent for all WebKit notifications |
637 // for unit testing. | 645 // for unit testing. |
638 bool send_accessibility_updated_notifications_; | 646 bool send_accessibility_updated_notifications_; |
639 | 647 |
648 // Serialized frame tree structure for the page displayed by the render view. | |
awong
2012/08/20 21:56:31
Add something that describes what format this is e
nasko
2012/08/21 00:34:45
Done.
| |
649 std::string frame_tree_; | |
650 | |
640 // The most recently received accessibility tree - for unit testing only. | 651 // The most recently received accessibility tree - for unit testing only. |
641 AccessibilityNodeData accessibility_tree_; | 652 AccessibilityNodeData accessibility_tree_; |
642 | 653 |
643 // The termination status of the last render view that terminated. | 654 // The termination status of the last render view that terminated. |
644 base::TerminationStatus render_view_termination_status_; | 655 base::TerminationStatus render_view_termination_status_; |
645 | 656 |
646 // Holds PowerSaveBlockers for the media players in use. Key is the | 657 // Holds PowerSaveBlockers for the media players in use. Key is the |
647 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. | 658 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. |
648 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; | 659 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; |
649 PowerSaveBlockerMap power_save_blockers_; | 660 PowerSaveBlockerMap power_save_blockers_; |
650 | 661 |
651 // A list of observers that filter messages. Weak references. | 662 // A list of observers that filter messages. Weak references. |
652 ObserverList<RenderViewHostObserver> observers_; | 663 ObserverList<RenderViewHostObserver> observers_; |
653 | 664 |
654 // When the last ShouldClose message was sent. | 665 // When the last ShouldClose message was sent. |
655 base::TimeTicks send_should_close_start_time_; | 666 base::TimeTicks send_should_close_start_time_; |
656 | 667 |
657 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 668 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
658 }; | 669 }; |
659 | 670 |
660 #if defined(COMPILER_MSVC) | 671 #if defined(COMPILER_MSVC) |
661 #pragma warning(pop) | 672 #pragma warning(pop) |
662 #endif | 673 #endif |
663 | 674 |
664 } // namespace content | 675 } // namespace content |
665 | 676 |
666 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 677 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |