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