| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual void Show() OVERRIDE; | 61 virtual void Show() OVERRIDE; |
| 62 virtual void Hide() OVERRIDE; | 62 virtual void Hide() OVERRIDE; |
| 63 virtual void DontProceed() OVERRIDE; | 63 virtual void DontProceed() OVERRIDE; |
| 64 virtual void Proceed() OVERRIDE; | 64 virtual void Proceed() OVERRIDE; |
| 65 virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; | 65 virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; |
| 66 virtual InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; | 66 virtual InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; |
| 67 virtual void DontCreateViewForTesting() OVERRIDE; | 67 virtual void DontCreateViewForTesting() OVERRIDE; |
| 68 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 68 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
| 69 virtual void Focus() OVERRIDE; | 69 virtual void Focus() OVERRIDE; |
| 70 | 70 |
| 71 // This is called by a hosting WebContents to notify this interstitial page | |
| 72 // that it is going away. | |
| 73 void WebContentsWillBeDestroyed(); | |
| 74 | |
| 75 // Allows the user to navigate away by disabling the interstitial, canceling | 71 // Allows the user to navigate away by disabling the interstitial, canceling |
| 76 // the pending request, and unblocking the hidden renderer. The interstitial | 72 // the pending request, and unblocking the hidden renderer. The interstitial |
| 77 // will stay visible until the navigation completes. | 73 // will stay visible until the navigation completes. |
| 78 void CancelForNavigation(); | 74 void CancelForNavigation(); |
| 79 | 75 |
| 80 // Focus the first (last if reverse is true) element in the interstitial page. | 76 // Focus the first (last if reverse is true) element in the interstitial page. |
| 81 // Called when tab traversing. | 77 // Called when tab traversing. |
| 82 void FocusThroughTabTraversal(bool reverse); | 78 void FocusThroughTabTraversal(bool reverse); |
| 83 | 79 |
| 84 RenderWidgetHostView* GetView(); | 80 RenderWidgetHostView* GetView(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 102 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 98 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
| 103 | 99 |
| 104 protected: | 100 protected: |
| 105 // NotificationObserver method: | 101 // NotificationObserver method: |
| 106 virtual void Observe(int type, | 102 virtual void Observe(int type, |
| 107 const NotificationSource& source, | 103 const NotificationSource& source, |
| 108 const NotificationDetails& details) OVERRIDE; | 104 const NotificationDetails& details) OVERRIDE; |
| 109 | 105 |
| 110 // WebContentsObserver implementation: | 106 // WebContentsObserver implementation: |
| 111 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 107 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 112 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 108 virtual void WebContentsDestroyed() OVERRIDE; |
| 113 virtual void NavigationEntryCommitted( | 109 virtual void NavigationEntryCommitted( |
| 114 const LoadCommittedDetails& load_details) OVERRIDE; | 110 const LoadCommittedDetails& load_details) OVERRIDE; |
| 115 | 111 |
| 116 // RenderFrameHostDelegate implementation: | 112 // RenderFrameHostDelegate implementation: |
| 117 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, | 113 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, |
| 118 const IPC::Message& message) OVERRIDE; | 114 const IPC::Message& message) OVERRIDE; |
| 119 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; | 115 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; |
| 120 | 116 |
| 121 // RenderViewHostDelegate implementation: | 117 // RenderViewHostDelegate implementation: |
| 122 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; | 118 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 282 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
| 287 | 283 |
| 288 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 284 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 289 | 285 |
| 290 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 286 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
| 291 }; | 287 }; |
| 292 | 288 |
| 293 } // namespace content | 289 } // namespace content |
| 294 | 290 |
| 295 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 291 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
| OLD | NEW |