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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.h

Issue 697163002: Devirtualize InterstitialPageImpl::CreateRenderViewHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool* is_keyboard_shortcut) override; 161 bool* is_keyboard_shortcut) override;
162 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override; 162 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override;
163 #if defined(OS_WIN) 163 #if defined(OS_WIN)
164 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override; 164 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override;
165 #endif 165 #endif
166 166
167 bool enabled() const { return enabled_; } 167 bool enabled() const { return enabled_; }
168 WebContents* web_contents() const; 168 WebContents* web_contents() const;
169 const GURL& url() const { return url_; } 169 const GURL& url() const { return url_; }
170 170
171 // Creates the RenderViewHost containing the interstitial content.
172 // Overriden in unit tests.
173 virtual RenderViewHost* CreateRenderViewHost();
174
175 // Creates the WebContentsView that shows the interstitial RVH. 171 // Creates the WebContentsView that shows the interstitial RVH.
176 // Overriden in unit tests. 172 // Overriden in unit tests.
177 virtual WebContentsView* CreateWebContentsView(); 173 virtual WebContentsView* CreateWebContentsView();
178 174
179 // Notification magic. 175 // Notification magic.
180 NotificationRegistrar notification_registrar_; 176 NotificationRegistrar notification_registrar_;
181 177
182 private: 178 private:
183 class InterstitialPageRVHDelegateView; 179 class InterstitialPageRVHDelegateView;
184 180
185 // Disable the interstitial: 181 // Disable the interstitial:
186 // - if it is not yet showing, then it won't be shown. 182 // - if it is not yet showing, then it won't be shown.
187 // - any command sent by the RenderViewHost will be ignored. 183 // - any command sent by the RenderViewHost will be ignored.
188 void Disable(); 184 void Disable();
189 185
190 // Delete ourselves, causing Shutdown on the RVH to be called. 186 // Delete ourselves, causing Shutdown on the RVH to be called.
191 void Shutdown(); 187 void Shutdown();
192 188
193 void OnNavigatingAwayOrTabClosing(); 189 void OnNavigatingAwayOrTabClosing();
194 190
195 // Executes the passed action on the ResourceDispatcher (on the IO thread). 191 // Executes the passed action on the ResourceDispatcher (on the IO thread).
196 // Used to block/resume/cancel requests for the RenderViewHost hidden by this 192 // Used to block/resume/cancel requests for the RenderViewHost hidden by this
197 // interstitial. 193 // interstitial.
198 void TakeActionOnResourceDispatcher(ResourceRequestAction action); 194 void TakeActionOnResourceDispatcher(ResourceRequestAction action);
199 195
200 // IPC message handlers. 196 // IPC message handlers.
201 void OnDomOperationResponse(const std::string& json_string, 197 void OnDomOperationResponse(const std::string& json_string,
202 int automation_id); 198 int automation_id);
203 199
200 // Creates the RenderViewHost containing the interstitial content.
201 RenderViewHostImpl* CreateRenderViewHost();
202
204 // The contents in which we are displayed. This is valid until Hide is 203 // The contents in which we are displayed. This is valid until Hide is
205 // called, at which point it will be set to NULL because the WebContents 204 // called, at which point it will be set to NULL because the WebContents
206 // itself may be deleted. 205 // itself may be deleted.
207 WebContents* web_contents_; 206 WebContents* web_contents_;
208 207
209 // The NavigationController for the content this page is being displayed over. 208 // The NavigationController for the content this page is being displayed over.
210 NavigationControllerImpl* controller_; 209 NavigationControllerImpl* controller_;
211 210
212 // Delegate for dispatching keyboard events and accessing the native view. 211 // Delegate for dispatching keyboard events and accessing the native view.
213 RenderWidgetHostDelegate* render_widget_host_delegate_; 212 RenderWidgetHostDelegate* render_widget_host_delegate_;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; 279 scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
281 280
282 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; 281 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
283 282
284 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); 283 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl);
285 }; 284 };
286 285
287 } // namespace content 286 } // namespace content
288 287
289 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ 288 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698