Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 void FocusThroughTabTraversal(bool reverse); | 81 void FocusThroughTabTraversal(bool reverse); |
| 82 | 82 |
| 83 RenderWidgetHostView* GetView(); | 83 RenderWidgetHostView* GetView(); |
| 84 | 84 |
| 85 // See description above field. | 85 // See description above field. |
| 86 void set_reload_on_dont_proceed(bool value) { | 86 void set_reload_on_dont_proceed(bool value) { |
| 87 reload_on_dont_proceed_ = value; | 87 reload_on_dont_proceed_ = value; |
| 88 } | 88 } |
| 89 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } | 89 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } |
| 90 | 90 |
| 91 bool pause_throbber() const { return pause_throbber_; } | |
| 92 | |
| 91 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in | 93 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in |
| 92 // the meantime make it public, so it can be called directly. | 94 // the meantime make it public, so it can be called directly. |
| 93 void DidNavigate( | 95 void DidNavigate( |
| 94 RenderViewHost* render_view_host, | 96 RenderViewHost* render_view_host, |
| 95 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 97 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
| 96 | 98 |
| 97 protected: | 99 protected: |
| 98 // NotificationObserver method: | 100 // NotificationObserver method: |
| 99 void Observe(int type, | 101 void Observe(int type, |
| 100 const NotificationSource& source, | 102 const NotificationSource& source, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 FrameTree frame_tree_; | 266 FrameTree frame_tree_; |
| 265 | 267 |
| 266 // The IDs for the Render[View|Process]Host hidden by this interstitial. | 268 // The IDs for the Render[View|Process]Host hidden by this interstitial. |
| 267 int original_child_id_; | 269 int original_child_id_; |
| 268 int original_rvh_id_; | 270 int original_rvh_id_; |
| 269 | 271 |
| 270 // Whether or not we should change the title of the contents when hidden (to | 272 // Whether or not we should change the title of the contents when hidden (to |
| 271 // revert it to its original value). | 273 // revert it to its original value). |
| 272 bool should_revert_web_contents_title_; | 274 bool should_revert_web_contents_title_; |
| 273 | 275 |
| 274 // Whether or not the contents was loading resources when the interstitial was | |
| 275 // shown. We restore this state if the user proceeds from the interstitial. | |
| 276 bool web_contents_was_loading_; | |
| 277 | |
| 278 // Whether the ResourceDispatcherHost has been notified to cancel/resume the | 276 // Whether the ResourceDispatcherHost has been notified to cancel/resume the |
| 279 // resource requests blocked for the RenderViewHost. | 277 // resource requests blocked for the RenderViewHost. |
| 280 bool resource_dispatcher_host_notified_; | 278 bool resource_dispatcher_host_notified_; |
| 281 | 279 |
| 282 // The original title of the contents that should be reverted to when the | 280 // The original title of the contents that should be reverted to when the |
| 283 // interstitial is hidden. | 281 // interstitial is hidden. |
| 284 base::string16 original_web_contents_title_; | 282 base::string16 original_web_contents_title_; |
| 285 | 283 |
| 286 // Our RenderViewHostDelegateView, necessary for accelerators to work. | 284 // Our RenderViewHostDelegateView, necessary for accelerators to work. |
| 287 scoped_ptr<InterstitialPageRVHDelegateView> rvh_delegate_view_; | 285 scoped_ptr<InterstitialPageRVHDelegateView> rvh_delegate_view_; |
| 288 | 286 |
| 289 // Settings passed to the renderer. | 287 // Settings passed to the renderer. |
| 290 mutable RendererPreferences renderer_preferences_; | 288 mutable RendererPreferences renderer_preferences_; |
| 291 | 289 |
| 292 bool create_view_; | 290 bool create_view_; |
| 293 | 291 |
| 292 // Whether the throbber should be paused. This is true from the moment the | |
| 293 // interstitial is shown until the moment the interstitial goes away or the | |
| 294 // user choses to proceed. | |
|
Charlie Reis
2016/02/19 05:24:54
nit: chooses
clamy
2016/02/19 12:02:05
Done.
| |
| 295 bool pause_throbber_; | |
| 296 | |
| 294 scoped_ptr<InterstitialPageDelegate> delegate_; | 297 scoped_ptr<InterstitialPageDelegate> delegate_; |
| 295 | 298 |
| 296 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 299 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 297 | 300 |
| 298 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 301 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
| 299 | 302 |
| 300 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 303 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 } // namespace content | 306 } // namespace content |
| 304 | 307 |
| 305 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 308 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
| OLD | NEW |