| 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 "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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 NotificationRegistrar notification_registrar_; | 174 NotificationRegistrar notification_registrar_; |
| 175 | 175 |
| 176 private: | 176 private: |
| 177 class InterstitialPageRVHDelegateView; | 177 class InterstitialPageRVHDelegateView; |
| 178 | 178 |
| 179 // Disable the interstitial: | 179 // Disable the interstitial: |
| 180 // - if it is not yet showing, then it won't be shown. | 180 // - if it is not yet showing, then it won't be shown. |
| 181 // - any command sent by the RenderViewHost will be ignored. | 181 // - any command sent by the RenderViewHost will be ignored. |
| 182 void Disable(); | 182 void Disable(); |
| 183 | 183 |
| 184 // Shutdown the RVH. We will be deleted by the time this method returns. | 184 // Delete ourselves, causing Shutdown on the RVH to be called. |
| 185 void Shutdown(RenderViewHostImpl* render_view_host); | 185 void Shutdown(); |
| 186 | 186 |
| 187 void OnNavigatingAwayOrTabClosing(); | 187 void OnNavigatingAwayOrTabClosing(); |
| 188 | 188 |
| 189 // Executes the passed action on the ResourceDispatcher (on the IO thread). | 189 // Executes the passed action on the ResourceDispatcher (on the IO thread). |
| 190 // Used to block/resume/cancel requests for the RenderViewHost hidden by this | 190 // Used to block/resume/cancel requests for the RenderViewHost hidden by this |
| 191 // interstitial. | 191 // interstitial. |
| 192 void TakeActionOnResourceDispatcher(ResourceRequestAction action); | 192 void TakeActionOnResourceDispatcher(ResourceRequestAction action); |
| 193 | 193 |
| 194 // The contents in which we are displayed. This is valid until Hide is | 194 // The contents in which we are displayed. This is valid until Hide is |
| 195 // called, at which point it will be set to NULL because the WebContents | 195 // called, at which point it will be set to NULL because the WebContents |
| (...skipping 27 matching lines...) Expand all Loading... |
| 223 | 223 |
| 224 // Whether this interstitial is enabled. See Disable() for more info. | 224 // Whether this interstitial is enabled. See Disable() for more info. |
| 225 bool enabled_; | 225 bool enabled_; |
| 226 | 226 |
| 227 // Whether the Proceed or DontProceed methods have been called yet. | 227 // Whether the Proceed or DontProceed methods have been called yet. |
| 228 ActionState action_taken_; | 228 ActionState action_taken_; |
| 229 | 229 |
| 230 // The RenderViewHost displaying the interstitial contents. This is valid | 230 // The RenderViewHost displaying the interstitial contents. This is valid |
| 231 // until Hide is called, at which point it will be set to NULL, signifying | 231 // until Hide is called, at which point it will be set to NULL, signifying |
| 232 // that shutdown has started. | 232 // that shutdown has started. |
| 233 // TODO(creis): This is now owned by the FrameTree. We should route things |
| 234 // through the tree's root RenderFrameHost instead. |
| 233 RenderViewHostImpl* render_view_host_; | 235 RenderViewHostImpl* render_view_host_; |
| 234 | 236 |
| 235 // The frame tree structure of the current page. | 237 // The frame tree structure of the current page. |
| 236 FrameTree frame_tree_; | 238 FrameTree frame_tree_; |
| 237 | 239 |
| 238 // The IDs for the Render[View|Process]Host hidden by this interstitial. | 240 // The IDs for the Render[View|Process]Host hidden by this interstitial. |
| 239 int original_child_id_; | 241 int original_child_id_; |
| 240 int original_rvh_id_; | 242 int original_rvh_id_; |
| 241 | 243 |
| 242 // Whether or not we should change the title of the contents when hidden (to | 244 // Whether or not we should change the title of the contents when hidden (to |
| (...skipping 25 matching lines...) Expand all Loading... |
| 268 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 270 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
| 269 | 271 |
| 270 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 272 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 271 | 273 |
| 272 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 274 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
| 273 }; | 275 }; |
| 274 | 276 |
| 275 } // namespace content | 277 } // namespace content |
| 276 | 278 |
| 277 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 279 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
| OLD | NEW |