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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 InterstitialPageDelegate* delegate); | 56 InterstitialPageDelegate* delegate); |
57 ~InterstitialPageImpl() override; | 57 ~InterstitialPageImpl() override; |
58 | 58 |
59 // InterstitialPage implementation: | 59 // InterstitialPage implementation: |
60 void Show() override; | 60 void Show() override; |
61 void Hide() override; | 61 void Hide() override; |
62 void DontProceed() override; | 62 void DontProceed() override; |
63 void Proceed() override; | 63 void Proceed() override; |
64 RenderViewHost* GetRenderViewHostForTesting() const override; | 64 RenderViewHost* GetRenderViewHostForTesting() const override; |
65 InterstitialPageDelegate* GetDelegateForTesting() override; | 65 InterstitialPageDelegate* GetDelegateForTesting() override; |
66 WebContents* GetAsWebContents() override; | |
66 void DontCreateViewForTesting() override; | 67 void DontCreateViewForTesting() override; |
67 void SetSize(const gfx::Size& size) override; | 68 void SetSize(const gfx::Size& size) override; |
68 void Focus() override; | 69 void Focus() override; |
69 | 70 |
70 // Allows the user to navigate away by disabling the interstitial, canceling | 71 // Allows the user to navigate away by disabling the interstitial, canceling |
71 // the pending request, and unblocking the hidden renderer. The interstitial | 72 // the pending request, and unblocking the hidden renderer. The interstitial |
72 // will stay visible until the navigation completes. | 73 // will stay visible until the navigation completes. |
73 void CancelForNavigation(); | 74 void CancelForNavigation(); |
74 | 75 |
75 // 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. |
(...skipping 12 matching lines...) Expand all Loading... | |
88 // 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 |
89 // the RenderViewHost to properly route gestures to the interstitial. | 90 // the RenderViewHost to properly route gestures to the interstitial. |
90 RenderViewHost* GetRenderViewHost() const; | 91 RenderViewHost* GetRenderViewHost() const; |
91 #endif | 92 #endif |
92 | 93 |
93 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in | 94 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in |
94 // the meantime make it public, so it can be called directly. | 95 // the meantime make it public, so it can be called directly. |
95 void DidNavigate( | 96 void DidNavigate( |
96 RenderViewHost* render_view_host, | 97 RenderViewHost* render_view_host, |
97 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 98 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
99 FrameTree* GetFrameTree() override; | |
palmer
2015/04/20 23:51:58
Is moving this from lower down in the file to here
| |
98 | 100 |
99 protected: | 101 protected: |
100 // NotificationObserver method: | 102 // NotificationObserver method: |
101 void Observe(int type, | 103 void Observe(int type, |
102 const NotificationSource& source, | 104 const NotificationSource& source, |
103 const NotificationDetails& details) override; | 105 const NotificationDetails& details) override; |
104 | 106 |
105 // RenderFrameHostDelegate implementation: | 107 // RenderFrameHostDelegate implementation: |
106 bool OnMessageReceived(RenderFrameHost* render_frame_host, | 108 bool OnMessageReceived(RenderFrameHost* render_frame_host, |
107 const IPC::Message& message) override; | 109 const IPC::Message& message) override; |
(...skipping 29 matching lines...) Expand all Loading... | |
137 void ShowCreatedWindow(int route_id, | 139 void ShowCreatedWindow(int route_id, |
138 WindowOpenDisposition disposition, | 140 WindowOpenDisposition disposition, |
139 const gfx::Rect& initial_pos, | 141 const gfx::Rect& initial_pos, |
140 bool user_gesture) override; | 142 bool user_gesture) override; |
141 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_pos) override; | 143 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_pos) override; |
142 void ShowCreatedFullscreenWidget(int route_id) override; | 144 void ShowCreatedFullscreenWidget(int route_id) override; |
143 | 145 |
144 SessionStorageNamespace* GetSessionStorageNamespace( | 146 SessionStorageNamespace* GetSessionStorageNamespace( |
145 SiteInstance* instance) override; | 147 SiteInstance* instance) override; |
146 | 148 |
147 FrameTree* GetFrameTree() override; | |
148 | |
149 // RenderWidgetHostDelegate implementation: | 149 // RenderWidgetHostDelegate implementation: |
150 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override; | 150 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override; |
151 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 151 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
152 bool* is_keyboard_shortcut) override; | 152 bool* is_keyboard_shortcut) override; |
153 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override; | 153 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override; |
154 #if defined(OS_WIN) | 154 #if defined(OS_WIN) |
155 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override; | 155 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override; |
156 #endif | 156 #endif |
157 | 157 |
158 bool enabled() const { return enabled_; } | 158 bool enabled() const { return enabled_; } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
294 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 294 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
295 | 295 |
296 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 296 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
297 | 297 |
298 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 298 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
299 }; | 299 }; |
300 | 300 |
301 } // namespace content | 301 } // namespace content |
302 | 302 |
303 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ | 303 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ |
OLD | NEW |