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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 72233002: Move RenderViewHostManager from WebContents to FrameTreeNode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 7 years, 1 month 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_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 RenderWidgetHostViewPort* GetRenderWidgetHostViewPort() const; 753 RenderWidgetHostViewPort* GetRenderWidgetHostViewPort() const;
754 754
755 // Misc non-view stuff ------------------------------------------------------- 755 // Misc non-view stuff -------------------------------------------------------
756 756
757 // Helper functions for sending notifications. 757 // Helper functions for sending notifications.
758 void NotifySwapped(RenderViewHost* old_host, RenderViewHost* new_host); 758 void NotifySwapped(RenderViewHost* old_host, RenderViewHost* new_host);
759 void NotifyDisconnected(); 759 void NotifyDisconnected();
760 760
761 void SetEncoding(const std::string& encoding); 761 void SetEncoding(const std::string& encoding);
762 762
763 // TODO(creis): This should take in a FrameTreeNode to know which node's
764 // render manager to return. For now, we just return the root's.
765 RenderViewHostManager* GetRenderManager() const;
766
763 RenderViewHostImpl* GetRenderViewHostImpl(); 767 RenderViewHostImpl* GetRenderViewHostImpl();
764 768
765 // Removes browser plugin embedder if there is one. 769 // Removes browser plugin embedder if there is one.
766 void RemoveBrowserPluginEmbedder(); 770 void RemoveBrowserPluginEmbedder();
767 771
768 // Clear |render_view_host|'s PowerSaveBlockers. 772 // Clear |render_view_host|'s PowerSaveBlockers.
769 void ClearPowerSaveBlockers(RenderViewHost* render_view_host); 773 void ClearPowerSaveBlockers(RenderViewHost* render_view_host);
770 774
771 // Clear all PowerSaveBlockers, leave power_save_blocker_ empty. 775 // Clear all PowerSaveBlockers, leave power_save_blocker_ empty.
772 void ClearAllPowerSaveBlockers(); 776 void ClearAllPowerSaveBlockers();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 808
805 // These maps hold on to the widgets that we created on behalf of the renderer 809 // These maps hold on to the widgets that we created on behalf of the renderer
806 // that haven't shown yet. 810 // that haven't shown yet.
807 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; 811 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews;
808 PendingWidgetViews pending_widget_views_; 812 PendingWidgetViews pending_widget_views_;
809 813
810 typedef std::map<WebContentsImpl*, DestructionObserver*> DestructionObservers; 814 typedef std::map<WebContentsImpl*, DestructionObserver*> DestructionObservers;
811 DestructionObservers destruction_observers_; 815 DestructionObservers destruction_observers_;
812 816
813 // A list of observers notified when page state changes. Weak references. 817 // A list of observers notified when page state changes. Weak references.
814 // This MUST be listed above render_manager_ since at destruction time the 818 // This MUST be listed above frame_tree_ since at destruction time the
815 // latter might cause RenderViewHost's destructor to call us and we might use 819 // latter might cause RenderViewHost's destructor to call us and we might use
816 // the observer list then. 820 // the observer list then.
817 ObserverList<WebContentsObserver> observers_; 821 ObserverList<WebContentsObserver> observers_;
818 822
819 // The tab that opened this tab, if any. Will be set to null if the opener 823 // The tab that opened this tab, if any. Will be set to null if the opener
820 // is closed. 824 // is closed.
821 WebContentsImpl* opener_; 825 WebContentsImpl* opener_;
822 826
823 #if defined(OS_WIN) && defined(USE_AURA) 827 #if defined(OS_WIN) && defined(USE_AURA)
824 gfx::NativeViewAccessible accessible_parent_; 828 gfx::NativeViewAccessible accessible_parent_;
825 #endif 829 #endif
826 830
827 // Helper classes ------------------------------------------------------------ 831 // Helper classes ------------------------------------------------------------
828 832
829 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker 833 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker
830 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie 834 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie
831 // on to PowerSaveBlocker. 835 // on to PowerSaveBlocker.
832 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > 836 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> >
833 PowerSaveBlockerMap; 837 PowerSaveBlockerMap;
834 PowerSaveBlockerMap power_save_blockers_; 838 PowerSaveBlockerMap power_save_blockers_;
835 839
836 // Manages creation and swapping of render views. 840 // Manages the frame tree of the page and process swaps in each node.
837 RenderViewHostManager render_manager_;
838
839 // The frame tree structure of the current page.
840 FrameTree frame_tree_; 841 FrameTree frame_tree_;
841 842
842 #if defined(OS_ANDROID) 843 #if defined(OS_ANDROID)
843 // Manages injecting Java objects into all RenderViewHosts associated with 844 // Manages injecting Java objects into all RenderViewHosts associated with
844 // this WebContentsImpl. 845 // this WebContentsImpl.
845 scoped_ptr<JavaBridgeDispatcherHostManager> 846 scoped_ptr<JavaBridgeDispatcherHostManager>
846 java_bridge_dispatcher_host_manager_; 847 java_bridge_dispatcher_host_manager_;
847 #endif 848 #endif
848 849
849 // SavePackage, lazily created. 850 // SavePackage, lazily created.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // Maps the ids of pending image downloads to their callbacks 986 // Maps the ids of pending image downloads to their callbacks
986 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; 987 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap;
987 ImageDownloadMap image_download_map_; 988 ImageDownloadMap image_download_map_;
988 989
989 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 990 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
990 }; 991 };
991 992
992 } // namespace content 993 } // namespace content
993 994
994 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 995 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698