| 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 <memory> | 10 #include <memory> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 RenderViewHost* render_view_host, | 95 RenderViewHost* render_view_host, |
| 96 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 96 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
| 97 | 97 |
| 98 protected: | 98 protected: |
| 99 // NotificationObserver method: | 99 // NotificationObserver method: |
| 100 void Observe(int type, | 100 void Observe(int type, |
| 101 const NotificationSource& source, | 101 const NotificationSource& source, |
| 102 const NotificationDetails& details) override; | 102 const NotificationDetails& details) override; |
| 103 | 103 |
| 104 // RenderFrameHostDelegate implementation: | 104 // RenderFrameHostDelegate implementation: |
| 105 bool OnMessageReceived(RenderFrameHost* render_frame_host, | 105 bool OnMessageReceived(RenderFrameHostImpl* render_frame_host, |
| 106 const IPC::Message& message) override; | 106 const IPC::Message& message) override; |
| 107 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; | 107 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; |
| 108 void UpdateTitle(RenderFrameHost* render_frame_host, | 108 void UpdateTitle(RenderFrameHost* render_frame_host, |
| 109 const base::string16& title, | 109 const base::string16& title, |
| 110 base::i18n::TextDirection title_direction) override; | 110 base::i18n::TextDirection title_direction) override; |
| 111 InterstitialPage* GetAsInterstitialPage() override; | 111 InterstitialPage* GetAsInterstitialPage() override; |
| 112 AccessibilityMode GetAccessibilityMode() const override; | 112 AccessibilityMode GetAccessibilityMode() const override; |
| 113 void Cut() override; | 113 void Cut() override; |
| 114 void Copy() override; | 114 void Copy() override; |
| 115 void Paste() override; | 115 void Paste() override; |
| 116 void SelectAll() override; | 116 void SelectAll() override; |
| 117 | 117 |
| 118 // RenderViewHostDelegate implementation: | 118 // RenderViewHostDelegate implementation: |
| 119 RenderViewHostDelegateView* GetDelegateView() override; | 119 RenderViewHostDelegateView* GetDelegateView() override; |
| 120 bool OnMessageReceived(RenderViewHost* render_view_host, | 120 bool OnMessageReceived(RenderViewHostImpl* render_view_host, |
| 121 const IPC::Message& message) override; | 121 const IPC::Message& message) override; |
| 122 const GURL& GetMainFrameLastCommittedURL() const override; | 122 const GURL& GetMainFrameLastCommittedURL() const override; |
| 123 void RenderViewTerminated(RenderViewHost* render_view_host, | 123 void RenderViewTerminated(RenderViewHost* render_view_host, |
| 124 base::TerminationStatus status, | 124 base::TerminationStatus status, |
| 125 int error_code) override; | 125 int error_code) override; |
| 126 RendererPreferences GetRendererPrefs( | 126 RendererPreferences GetRendererPrefs( |
| 127 BrowserContext* browser_context) const override; | 127 BrowserContext* browser_context) const override; |
| 128 void CreateNewWindow( | 128 void CreateNewWindow( |
| 129 SiteInstance* source_site_instance, | 129 SiteInstance* source_site_instance, |
| 130 int32_t route_id, | 130 int32_t route_id, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void Shutdown(); | 205 void Shutdown(); |
| 206 | 206 |
| 207 void OnNavigatingAwayOrTabClosing(); | 207 void OnNavigatingAwayOrTabClosing(); |
| 208 | 208 |
| 209 // Executes the passed action on the ResourceDispatcher (on the IO thread). | 209 // Executes the passed action on the ResourceDispatcher (on the IO thread). |
| 210 // Used to block/resume/cancel requests for the RenderViewHost hidden by this | 210 // Used to block/resume/cancel requests for the RenderViewHost hidden by this |
| 211 // interstitial. | 211 // interstitial. |
| 212 void TakeActionOnResourceDispatcher(ResourceRequestAction action); | 212 void TakeActionOnResourceDispatcher(ResourceRequestAction action); |
| 213 | 213 |
| 214 // IPC message handlers. | 214 // IPC message handlers. |
| 215 void OnDomOperationResponse(const std::string& json_string); | 215 void OnDomOperationResponse(RenderFrameHostImpl* source, |
| 216 const std::string& json_string); |
| 216 | 217 |
| 217 // Creates the RenderViewHost containing the interstitial content. | 218 // Creates the RenderViewHost containing the interstitial content. |
| 218 RenderViewHostImpl* CreateRenderViewHost(); | 219 RenderViewHostImpl* CreateRenderViewHost(); |
| 219 | 220 |
| 220 // Watches the underlying WebContents for reasons to cancel the interstitial. | 221 // Watches the underlying WebContents for reasons to cancel the interstitial. |
| 221 UnderlyingContentObserver underlying_content_observer_; | 222 UnderlyingContentObserver underlying_content_observer_; |
| 222 | 223 |
| 223 // The contents in which we are displayed. This is valid until Hide is | 224 // The contents in which we are displayed. This is valid until Hide is |
| 224 // called, at which point it will be set to NULL because the WebContents | 225 // called, at which point it will be set to NULL because the WebContents |
| 225 // itself may be deleted. | 226 // itself may be deleted. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 295 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 295 | 296 |
| 296 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 297 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
| 297 | 298 |
| 298 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 299 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
| 299 }; | 300 }; |
| 300 | 301 |
| 301 } // namespace content | 302 } // namespace content |
| 302 | 303 |
| 303 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 304 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
| OLD | NEW |