Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 10827078: Support frame tree propagation between renderers in the same browsing instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on Albert's comments and added explicit test for adding/removing frames using JavaScrip… Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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() const 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 #endif 387 #endif
387 388
388 #if defined(OS_ANDROID) 389 #if defined(OS_ANDROID)
389 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); 390 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices);
390 void DidCancelPopupMenu(); 391 void DidCancelPopupMenu();
391 #endif 392 #endif
392 393
393 // User rotated the screen. Calls the "onorientationchange" Javascript hook. 394 // User rotated the screen. Calls the "onorientationchange" Javascript hook.
394 void SendOrientationChangeEvent(int orientation); 395 void SendOrientationChangeEvent(int orientation);
395 396
397 // Updates the frame tree for this RVH and sends an IPC down to the renderer
398 // process to keep them in sync.
399 void UpdateFrameTree(int process_id,
400 int route_id,
401 const std::string& frame_tree);
402
396 void set_save_accessibility_tree_for_testing(bool save) { 403 void set_save_accessibility_tree_for_testing(bool save) {
397 save_accessibility_tree_for_testing_ = save; 404 save_accessibility_tree_for_testing_ = save;
398 } 405 }
399 406
400 void set_send_accessibility_updated_notifications(bool send) { 407 void set_send_accessibility_updated_notifications(bool send) {
401 send_accessibility_updated_notifications_ = send; 408 send_accessibility_updated_notifications_ = send;
402 } 409 }
403 410
404 const AccessibilityNodeData& accessibility_tree_for_testing() { 411 const AccessibilityNodeData& accessibility_tree_for_testing() {
405 return accessibility_tree_; 412 return accessibility_tree_;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 // A JSON serialized representation of the frame tree for the current document
649 // in the render view.
650 std::string frame_tree_;
651
640 // The most recently received accessibility tree - for unit testing only. 652 // The most recently received accessibility tree - for unit testing only.
641 AccessibilityNodeData accessibility_tree_; 653 AccessibilityNodeData accessibility_tree_;
642 654
643 // The termination status of the last render view that terminated. 655 // The termination status of the last render view that terminated.
644 base::TerminationStatus render_view_termination_status_; 656 base::TerminationStatus render_view_termination_status_;
645 657
646 // Holds PowerSaveBlockers for the media players in use. Key is the 658 // Holds PowerSaveBlockers for the media players in use. Key is the
647 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. 659 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker.
648 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; 660 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap;
649 PowerSaveBlockerMap power_save_blockers_; 661 PowerSaveBlockerMap power_save_blockers_;
650 662
651 // A list of observers that filter messages. Weak references. 663 // A list of observers that filter messages. Weak references.
652 ObserverList<RenderViewHostObserver> observers_; 664 ObserverList<RenderViewHostObserver> observers_;
653 665
654 // When the last ShouldClose message was sent. 666 // When the last ShouldClose message was sent.
655 base::TimeTicks send_should_close_start_time_; 667 base::TimeTicks send_should_close_start_time_;
656 668
657 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 669 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
658 }; 670 };
659 671
660 #if defined(COMPILER_MSVC) 672 #if defined(COMPILER_MSVC)
661 #pragma warning(pop) 673 #pragma warning(pop)
662 #endif 674 #endif
663 675
664 } // namespace content 676 } // namespace content
665 677
666 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 678 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698