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

Side by Side Diff: content/renderer/render_view.h

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments. Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_RENDER_VIEW_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 class SkBitmap; 72 class SkBitmap;
73 class SpeechInputDispatcher; 73 class SpeechInputDispatcher;
74 class SpellCheckProvider; 74 class SpellCheckProvider;
75 class WebPluginDelegatePepper; 75 class WebPluginDelegatePepper;
76 class WebPluginDelegateProxy; 76 class WebPluginDelegateProxy;
77 class WebUIBindings; 77 class WebUIBindings;
78 struct ContextMenuMediaParams; 78 struct ContextMenuMediaParams;
79 struct PP_Flash_NetAddress; 79 struct PP_Flash_NetAddress;
80 struct ThumbnailScore; 80 struct ThumbnailScore;
81 struct ViewHostMsg_RunFileChooser_Params; 81 struct ViewHostMsg_RunFileChooser_Params;
82 struct ViewMsg_ClosePage_Params; 82 struct ViewMsg_SwapOut_Params;
83 struct ViewMsg_Navigate_Params; 83 struct ViewMsg_Navigate_Params;
84 struct ViewMsg_StopFinding_Params; 84 struct ViewMsg_StopFinding_Params;
85 struct WebApplicationInfo; 85 struct WebApplicationInfo;
86 struct WebDropData; 86 struct WebDropData;
87 87
88 namespace base { 88 namespace base {
89 class WaitableEvent; 89 class WaitableEvent;
90 } 90 }
91 91
92 namespace chrome { 92 namespace chrome {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled. 245 // Current P2PSocketDispatcher. Set to NULL if P2P API is disabled.
246 P2PSocketDispatcher* p2p_socket_dispatcher() { 246 P2PSocketDispatcher* p2p_socket_dispatcher() {
247 return p2p_socket_dispatcher_; 247 return p2p_socket_dispatcher_;
248 } 248 }
249 249
250 // Functions to add and remove observers for this object. 250 // Functions to add and remove observers for this object.
251 void AddObserver(RenderViewObserver* observer); 251 void AddObserver(RenderViewObserver* observer);
252 void RemoveObserver(RenderViewObserver* observer); 252 void RemoveObserver(RenderViewObserver* observer);
253 253
254 // Swap this RenderView back in if the tab navigates back to this process.
255 void SwapIn();
256
254 // Called from JavaScript window.external.AddSearchProvider() to add a 257 // Called from JavaScript window.external.AddSearchProvider() to add a
255 // keyword for a provider described in the given OpenSearch document. 258 // keyword for a provider described in the given OpenSearch document.
256 void AddSearchProvider(const std::string& url, 259 void AddSearchProvider(const std::string& url,
257 search_provider::OSDDType provider_type); 260 search_provider::OSDDType provider_type);
258 261
259 // Returns the install state for the given search provider url. 262 // Returns the install state for the given search provider url.
260 search_provider::InstallState GetSearchProviderInstallState( 263 search_provider::InstallState GetSearchProviderInstallState(
261 WebKit::WebFrame* frame, 264 WebKit::WebFrame* frame,
262 const std::string& url); 265 const std::string& url);
263 266
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 754
752 void OnAccessibilityDoDefaultAction(int acc_obj_id); 755 void OnAccessibilityDoDefaultAction(int acc_obj_id);
753 void OnAccessibilityNotificationsAck(); 756 void OnAccessibilityNotificationsAck();
754 void OnAllowBindings(int enabled_bindings_flags); 757 void OnAllowBindings(int enabled_bindings_flags);
755 void OnAllowScriptToClose(bool script_can_close); 758 void OnAllowScriptToClose(bool script_can_close);
756 void OnAsyncFileOpened(base::PlatformFileError error_code, 759 void OnAsyncFileOpened(base::PlatformFileError error_code,
757 IPC::PlatformFileForTransit file_for_transit, 760 IPC::PlatformFileForTransit file_for_transit,
758 int message_id); 761 int message_id);
759 void OnCancelDownload(int32 download_id); 762 void OnCancelDownload(int32 download_id);
760 void OnClearFocusedNode(); 763 void OnClearFocusedNode();
761 void OnClosePage(const ViewMsg_ClosePage_Params& params); 764 void OnClosePage();
762 #if defined(ENABLE_FLAPPER_HACKS) 765 #if defined(ENABLE_FLAPPER_HACKS)
763 void OnConnectTcpACK(int request_id, 766 void OnConnectTcpACK(int request_id,
764 IPC::PlatformFileForTransit socket_for_transit, 767 IPC::PlatformFileForTransit socket_for_transit,
765 const PP_Flash_NetAddress& local_addr, 768 const PP_Flash_NetAddress& local_addr,
766 const PP_Flash_NetAddress& remote_addr); 769 const PP_Flash_NetAddress& remote_addr);
767 #endif 770 #endif
768 void OnContextMenuClosed( 771 void OnContextMenuClosed(
769 const webkit_glue::CustomContextMenuContext& custom_context); 772 const webkit_glue::CustomContextMenuContext& custom_context);
770 void OnCopy(); 773 void OnCopy();
771 void OnCopyImageAt(int x, int y); 774 void OnCopyImageAt(int x, int y);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 void OnSetPageEncoding(const std::string& encoding_name); 857 void OnSetPageEncoding(const std::string& encoding_name);
855 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); 858 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
856 #if defined(OS_MACOSX) 859 #if defined(OS_MACOSX)
857 void OnSetWindowVisibility(bool visible); 860 void OnSetWindowVisibility(bool visible);
858 #endif 861 #endif
859 void OnSetZoomLevel(double zoom_level); 862 void OnSetZoomLevel(double zoom_level);
860 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 863 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
861 void OnShouldClose(); 864 void OnShouldClose();
862 void OnStop(); 865 void OnStop();
863 void OnStopFinding(const ViewMsg_StopFinding_Params& params); 866 void OnStopFinding(const ViewMsg_StopFinding_Params& params);
867 void OnSwapOut(const ViewMsg_SwapOut_Params& params);
864 void OnThemeChanged(); 868 void OnThemeChanged();
865 void OnUndo(); 869 void OnUndo();
866 void OnUpdateBrowserWindowId(int window_id); 870 void OnUpdateBrowserWindowId(int window_id);
867 void OnUpdateTargetURLAck(); 871 void OnUpdateTargetURLAck();
868 void OnUpdateWebPreferences(const WebPreferences& prefs); 872 void OnUpdateWebPreferences(const WebPreferences& prefs);
869 #if defined(OS_MACOSX) 873 #if defined(OS_MACOSX)
870 void OnWindowFrameChanged(const gfx::Rect& window_frame, 874 void OnWindowFrameChanged(const gfx::Rect& window_frame,
871 const gfx::Rect& view_frame); 875 const gfx::Rect& view_frame);
872 void OnSelectPopupMenuItem(int selected_index); 876 void OnSelectPopupMenuItem(int selected_index);
873 #endif 877 #endif
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 // as a temporary holder for the state until the WebDataSource corresponding 1091 // as a temporary holder for the state until the WebDataSource corresponding
1088 // to the new navigation is created. See DidCreateDataSource. 1092 // to the new navigation is created. See DidCreateDataSource.
1089 scoped_ptr<NavigationState> pending_navigation_state_; 1093 scoped_ptr<NavigationState> pending_navigation_state_;
1090 1094
1091 // Timer used to delay the updating of nav state (see SyncNavigationState). 1095 // Timer used to delay the updating of nav state (see SyncNavigationState).
1092 base::OneShotTimer<RenderView> nav_state_sync_timer_; 1096 base::OneShotTimer<RenderView> nav_state_sync_timer_;
1093 1097
1094 // True if the RenderView is currently prerendering a page. 1098 // True if the RenderView is currently prerendering a page.
1095 bool is_prerendering_; 1099 bool is_prerendering_;
1096 1100
1101 // Whether this RenderView is currently swapped out, such that the tab is
1102 // being rendered by another process. If all RenderViews in a process are
1103 // swapped out, the process can exit.
1104 bool is_swapped_out_;
1105
1097 // Page IDs ------------------------------------------------------------------ 1106 // Page IDs ------------------------------------------------------------------
1098 // 1107 //
1099 // Page IDs allow the browser to identify pages in each renderer process for 1108 // Page IDs allow the browser to identify pages in each renderer process for
1100 // keeping back/forward history in sync. 1109 // keeping back/forward history in sync.
1101 1110
1102 // ID of the current page. Note that this is NOT updated for every main 1111 // ID of the current page. Note that this is NOT updated for every main
1103 // frame navigation, only for "regular" navigations that go into session 1112 // frame navigation, only for "regular" navigations that go into session
1104 // history. In particular, client redirects, like the page cycler uses 1113 // history. In particular, client redirects, like the page cycler uses
1105 // (document.location.href="foo") do not count as regular navigations and do 1114 // (document.location.href="foo") do not count as regular navigations and do
1106 // not increment the page id. 1115 // not increment the page id.
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 // bunch of stuff, you should probably create a helper class and put your 1340 // bunch of stuff, you should probably create a helper class and put your
1332 // data and methods on that to avoid bloating RenderView more. You can use 1341 // data and methods on that to avoid bloating RenderView more. You can use
1333 // the Observer interface to filter IPC messages and receive frame change 1342 // the Observer interface to filter IPC messages and receive frame change
1334 // notifications. 1343 // notifications.
1335 // --------------------------------------------------------------------------- 1344 // ---------------------------------------------------------------------------
1336 1345
1337 DISALLOW_COPY_AND_ASSIGN(RenderView); 1346 DISALLOW_COPY_AND_ASSIGN(RenderView);
1338 }; 1347 };
1339 1348
1340 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ 1349 #endif // CONTENT_RENDERER_RENDER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698