| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual void Show() OVERRIDE; | 52 virtual void Show() OVERRIDE; |
| 53 virtual void Hide() OVERRIDE; | 53 virtual void Hide() OVERRIDE; |
| 54 virtual void DontProceed() OVERRIDE; | 54 virtual void DontProceed() OVERRIDE; |
| 55 virtual void Proceed() OVERRIDE; | 55 virtual void Proceed() OVERRIDE; |
| 56 virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; | 56 virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; |
| 57 virtual InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; | 57 virtual InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; |
| 58 virtual void DontCreateViewForTesting() OVERRIDE; | 58 virtual void DontCreateViewForTesting() OVERRIDE; |
| 59 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 59 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
| 60 virtual void Focus() OVERRIDE; | 60 virtual void Focus() OVERRIDE; |
| 61 | 61 |
| 62 #if defined(OS_ANDROID) |
| 63 virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; |
| 64 #endif |
| 65 |
| 62 // Allows the user to navigate away by disabling the interstitial, canceling | 66 // Allows the user to navigate away by disabling the interstitial, canceling |
| 63 // the pending request, and unblocking the hidden renderer. The interstitial | 67 // the pending request, and unblocking the hidden renderer. The interstitial |
| 64 // will stay visible until the navigation completes. | 68 // will stay visible until the navigation completes. |
| 65 void CancelForNavigation(); | 69 void CancelForNavigation(); |
| 66 | 70 |
| 67 // Focus the first (last if reverse is true) element in the interstitial page. | 71 // Focus the first (last if reverse is true) element in the interstitial page. |
| 68 // Called when tab traversing. | 72 // Called when tab traversing. |
| 69 void FocusThroughTabTraversal(bool reverse); | 73 void FocusThroughTabTraversal(bool reverse); |
| 70 | 74 |
| 71 // See description above field. | 75 // See description above field. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 WindowOpenDisposition disposition, | 112 WindowOpenDisposition disposition, |
| 109 const gfx::Rect& initial_pos, | 113 const gfx::Rect& initial_pos, |
| 110 bool user_gesture) OVERRIDE; | 114 bool user_gesture) OVERRIDE; |
| 111 virtual void ShowCreatedWidget(int route_id, | 115 virtual void ShowCreatedWidget(int route_id, |
| 112 const gfx::Rect& initial_pos) OVERRIDE; | 116 const gfx::Rect& initial_pos) OVERRIDE; |
| 113 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; | 117 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; |
| 114 virtual void ShowContextMenu( | 118 virtual void ShowContextMenu( |
| 115 const ContextMenuParams& params, | 119 const ContextMenuParams& params, |
| 116 ContextMenuSourceType type) OVERRIDE; | 120 ContextMenuSourceType type) OVERRIDE; |
| 117 | 121 |
| 122 #if defined(OS_ANDROID) |
| 123 virtual void AttachLayer(WebKit::WebLayer* layer) OVERRIDE; |
| 124 virtual void RemoveLayer(WebKit::WebLayer* layer) OVERRIDE; |
| 125 #endif |
| 126 |
| 118 // RenderWidgetHostDelegate implementation: | 127 // RenderWidgetHostDelegate implementation: |
| 119 virtual void RenderWidgetDeleted( | 128 virtual void RenderWidgetDeleted( |
| 120 RenderWidgetHostImpl* render_widget_host) OVERRIDE; | 129 RenderWidgetHostImpl* render_widget_host) OVERRIDE; |
| 121 virtual bool PreHandleKeyboardEvent( | 130 virtual bool PreHandleKeyboardEvent( |
| 122 const NativeWebKeyboardEvent& event, | 131 const NativeWebKeyboardEvent& event, |
| 123 bool* is_keyboard_shortcut) OVERRIDE; | 132 bool* is_keyboard_shortcut) OVERRIDE; |
| 124 virtual void HandleKeyboardEvent( | 133 virtual void HandleKeyboardEvent( |
| 125 const NativeWebKeyboardEvent& event) OVERRIDE; | 134 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 126 | 135 |
| 127 bool enabled() const { return enabled_; } | 136 bool enabled() const { return enabled_; } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 scoped_ptr<InterstitialPageDelegate> delegate_; | 226 scoped_ptr<InterstitialPageDelegate> delegate_; |
| 218 | 227 |
| 219 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; | 228 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; |
| 220 | 229 |
| 221 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); | 230 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); |
| 222 }; | 231 }; |
| 223 | 232 |
| 224 } // namespace content | 233 } // namespace content |
| 225 | 234 |
| 226 #endif // CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ | 235 #endif // CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ |
| OLD | NEW |