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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 reload_on_dont_proceed_ = value; | 84 reload_on_dont_proceed_ = value; |
85 } | 85 } |
86 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } | 86 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } |
87 | 87 |
88 #if defined(OS_ANDROID) | 88 #if defined(OS_ANDROID) |
89 // Android shares a single platform window for all tabs, so we need to expose | 89 // Android shares a single platform window for all tabs, so we need to expose |
90 // the RenderViewHost to properly route gestures to the interstitial. | 90 // the RenderViewHost to properly route gestures to the interstitial. |
91 RenderViewHost* GetRenderViewHost() const; | 91 RenderViewHost* GetRenderViewHost() const; |
92 #endif | 92 #endif |
93 | 93 |
| 94 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in |
| 95 // the meantime make it public, so it can be called directly. |
| 96 void DidNavigate( |
| 97 RenderViewHost* render_view_host, |
| 98 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
| 99 |
94 protected: | 100 protected: |
95 // NotificationObserver method: | 101 // NotificationObserver method: |
96 virtual void Observe(int type, | 102 virtual void Observe(int type, |
97 const NotificationSource& source, | 103 const NotificationSource& source, |
98 const NotificationDetails& details) OVERRIDE; | 104 const NotificationDetails& details) OVERRIDE; |
99 | 105 |
100 // WebContentsObserver implementation: | 106 // WebContentsObserver implementation: |
101 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 107 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; |
102 virtual void NavigationEntryCommitted( | 108 virtual void NavigationEntryCommitted( |
103 const LoadCommittedDetails& load_details) OVERRIDE; | 109 const LoadCommittedDetails& load_details) OVERRIDE; |
104 | 110 |
105 // RenderFrameHostDelegate implementation: | 111 // RenderFrameHostDelegate implementation: |
106 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; | 112 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; |
107 | 113 |
108 // RenderViewHostDelegate implementation: | 114 // RenderViewHostDelegate implementation: |
109 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; | 115 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
110 virtual const GURL& GetURL() const OVERRIDE; | 116 virtual const GURL& GetURL() const OVERRIDE; |
111 virtual void RenderViewTerminated(RenderViewHost* render_view_host, | 117 virtual void RenderViewTerminated(RenderViewHost* render_view_host, |
112 base::TerminationStatus status, | 118 base::TerminationStatus status, |
113 int error_code) OVERRIDE; | 119 int error_code) OVERRIDE; |
114 virtual void DidNavigate( | |
115 RenderViewHost* render_view_host, | |
116 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; | |
117 virtual void UpdateTitle(RenderViewHost* render_view_host, | 120 virtual void UpdateTitle(RenderViewHost* render_view_host, |
118 int32 page_id, | 121 int32 page_id, |
119 const base::string16& title, | 122 const base::string16& title, |
120 base::i18n::TextDirection title_direction) OVERRIDE; | 123 base::i18n::TextDirection title_direction) OVERRIDE; |
121 virtual RendererPreferences GetRendererPrefs( | 124 virtual RendererPreferences GetRendererPrefs( |
122 BrowserContext* browser_context) const OVERRIDE; | 125 BrowserContext* browser_context) const OVERRIDE; |
123 virtual WebPreferences GetWebkitPrefs() OVERRIDE; | 126 virtual WebPreferences GetWebkitPrefs() OVERRIDE; |
124 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; | 127 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; |
125 virtual void CreateNewWindow( | 128 virtual void CreateNewWindow( |
126 int render_process_id, | 129 int render_process_id, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 273 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
271 | 274 |
272 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 275 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
273 | 276 |
274 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 277 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
275 }; | 278 }; |
276 | 279 |
277 } // namespace content | 280 } // namespace content |
278 | 281 |
279 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 282 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
OLD | NEW |