| 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_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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 751   RenderWidgetHostViewPort* GetRenderWidgetHostViewPort() const; | 751   RenderWidgetHostViewPort* GetRenderWidgetHostViewPort() const; | 
| 752 | 752 | 
| 753   // Misc non-view stuff ------------------------------------------------------- | 753   // Misc non-view stuff ------------------------------------------------------- | 
| 754 | 754 | 
| 755   // Helper functions for sending notifications. | 755   // Helper functions for sending notifications. | 
| 756   void NotifySwapped(RenderViewHost* old_host, RenderViewHost* new_host); | 756   void NotifySwapped(RenderViewHost* old_host, RenderViewHost* new_host); | 
| 757   void NotifyDisconnected(); | 757   void NotifyDisconnected(); | 
| 758 | 758 | 
| 759   void SetEncoding(const std::string& encoding); | 759   void SetEncoding(const std::string& encoding); | 
| 760 | 760 | 
|  | 761   // TODO(creis): This should take in a FrameTreeNode to know which node's | 
|  | 762   // render manager to return.  For now, we just return the root's. | 
|  | 763   RenderViewHostManager* GetRenderManager() const; | 
|  | 764 | 
| 761   RenderViewHostImpl* GetRenderViewHostImpl(); | 765   RenderViewHostImpl* GetRenderViewHostImpl(); | 
| 762 | 766 | 
| 763   // Removes browser plugin embedder if there is one. | 767   // Removes browser plugin embedder if there is one. | 
| 764   void RemoveBrowserPluginEmbedder(); | 768   void RemoveBrowserPluginEmbedder(); | 
| 765 | 769 | 
| 766   // Clear |render_view_host|'s PowerSaveBlockers. | 770   // Clear |render_view_host|'s PowerSaveBlockers. | 
| 767   void ClearPowerSaveBlockers(RenderViewHost* render_view_host); | 771   void ClearPowerSaveBlockers(RenderViewHost* render_view_host); | 
| 768 | 772 | 
| 769   // Clear all PowerSaveBlockers, leave power_save_blocker_ empty. | 773   // Clear all PowerSaveBlockers, leave power_save_blocker_ empty. | 
| 770   void ClearAllPowerSaveBlockers(); | 774   void ClearAllPowerSaveBlockers(); | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 797 | 801 | 
| 798   // These maps hold on to the widgets that we created on behalf of the renderer | 802   // These maps hold on to the widgets that we created on behalf of the renderer | 
| 799   // that haven't shown yet. | 803   // that haven't shown yet. | 
| 800   typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; | 804   typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; | 
| 801   PendingWidgetViews pending_widget_views_; | 805   PendingWidgetViews pending_widget_views_; | 
| 802 | 806 | 
| 803   typedef std::map<WebContentsImpl*, DestructionObserver*> DestructionObservers; | 807   typedef std::map<WebContentsImpl*, DestructionObserver*> DestructionObservers; | 
| 804   DestructionObservers destruction_observers_; | 808   DestructionObservers destruction_observers_; | 
| 805 | 809 | 
| 806   // A list of observers notified when page state changes. Weak references. | 810   // A list of observers notified when page state changes. Weak references. | 
| 807   // This MUST be listed above render_manager_ since at destruction time the | 811   // This MUST be listed above frame_tree_ since at destruction time the | 
| 808   // latter might cause RenderViewHost's destructor to call us and we might use | 812   // latter might cause RenderViewHost's destructor to call us and we might use | 
| 809   // the observer list then. | 813   // the observer list then. | 
| 810   ObserverList<WebContentsObserver> observers_; | 814   ObserverList<WebContentsObserver> observers_; | 
| 811 | 815 | 
| 812   // The tab that opened this tab, if any.  Will be set to null if the opener | 816   // The tab that opened this tab, if any.  Will be set to null if the opener | 
| 813   // is closed. | 817   // is closed. | 
| 814   WebContentsImpl* opener_; | 818   WebContentsImpl* opener_; | 
| 815 | 819 | 
| 816 #if defined(OS_WIN) && defined(USE_AURA) | 820 #if defined(OS_WIN) && defined(USE_AURA) | 
| 817   gfx::NativeViewAccessible accessible_parent_; | 821   gfx::NativeViewAccessible accessible_parent_; | 
| 818 #endif | 822 #endif | 
| 819 | 823 | 
| 820   // Helper classes ------------------------------------------------------------ | 824   // Helper classes ------------------------------------------------------------ | 
| 821 | 825 | 
| 822   // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker | 826   // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker | 
| 823   // pairs. Key is the RenderViewHost, value is the map which maps player_cookie | 827   // pairs. Key is the RenderViewHost, value is the map which maps player_cookie | 
| 824   // on to PowerSaveBlocker. | 828   // on to PowerSaveBlocker. | 
| 825   typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > | 829   typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > | 
| 826       PowerSaveBlockerMap; | 830       PowerSaveBlockerMap; | 
| 827   PowerSaveBlockerMap power_save_blockers_; | 831   PowerSaveBlockerMap power_save_blockers_; | 
| 828 | 832 | 
| 829   // Manages creation and swapping of render views. | 833   // Manages the frame tree of the page and process swaps in each node. | 
| 830   RenderViewHostManager render_manager_; |  | 
| 831 |  | 
| 832   // The frame tree structure of the current page. |  | 
| 833   FrameTree frame_tree_; | 834   FrameTree frame_tree_; | 
| 834 | 835 | 
| 835 #if defined(OS_ANDROID) | 836 #if defined(OS_ANDROID) | 
| 836   // Manages injecting Java objects into all RenderViewHosts associated with | 837   // Manages injecting Java objects into all RenderViewHosts associated with | 
| 837   // this WebContentsImpl. | 838   // this WebContentsImpl. | 
| 838   scoped_ptr<JavaBridgeDispatcherHostManager> | 839   scoped_ptr<JavaBridgeDispatcherHostManager> | 
| 839       java_bridge_dispatcher_host_manager_; | 840       java_bridge_dispatcher_host_manager_; | 
| 840 #endif | 841 #endif | 
| 841 | 842 | 
| 842   // SavePackage, lazily created. | 843   // SavePackage, lazily created. | 
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 978   // Maps the ids of pending image downloads to their callbacks | 979   // Maps the ids of pending image downloads to their callbacks | 
| 979   typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 980   typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 
| 980   ImageDownloadMap image_download_map_; | 981   ImageDownloadMap image_download_map_; | 
| 981 | 982 | 
| 982   DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 983   DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 
| 983 }; | 984 }; | 
| 984 | 985 | 
| 985 }  // namespace content | 986 }  // namespace content | 
| 986 | 987 | 
| 987 #endif  // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 988 #endif  // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 
| OLD | NEW | 
|---|