Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: content/browser/web_contents/interstitial_page_impl.h

Issue 11366118: Add support for interstitial pages on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Focus the first (last if reverse is true) element in the interstitial page. 67 // Focus the first (last if reverse is true) element in the interstitial page.
68 // Called when tab traversing. 68 // Called when tab traversing.
69 void FocusThroughTabTraversal(bool reverse); 69 void FocusThroughTabTraversal(bool reverse);
70 70
71 // See description above field. 71 // See description above field.
72 void set_reload_on_dont_proceed(bool value) { 72 void set_reload_on_dont_proceed(bool value) {
73 reload_on_dont_proceed_ = value; 73 reload_on_dont_proceed_ = value;
74 } 74 }
75 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } 75 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; }
76 76
77 #if defined(OS_ANDROID)
78 // Android shares a single platform window for all tabs, so we need to expose
79 // the RenderViewHost to properly route gestures to the interstitial.
80 RenderViewHost* GetRenderViewHost() const;
81 #endif
82
77 protected: 83 protected:
78 // NotificationObserver method: 84 // NotificationObserver method:
79 virtual void Observe(int type, 85 virtual void Observe(int type,
80 const NotificationSource& source, 86 const NotificationSource& source,
81 const NotificationDetails& details) OVERRIDE; 87 const NotificationDetails& details) OVERRIDE;
82 88
83 // RenderViewHostDelegate implementation: 89 // RenderViewHostDelegate implementation:
84 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; 90 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE;
85 virtual const GURL& GetURL() const OVERRIDE; 91 virtual const GURL& GetURL() const OVERRIDE;
86 virtual void RenderViewGone(RenderViewHost* render_view_host, 92 virtual void RenderViewGone(RenderViewHost* render_view_host,
(...skipping 21 matching lines...) Expand all
108 WindowOpenDisposition disposition, 114 WindowOpenDisposition disposition,
109 const gfx::Rect& initial_pos, 115 const gfx::Rect& initial_pos,
110 bool user_gesture) OVERRIDE; 116 bool user_gesture) OVERRIDE;
111 virtual void ShowCreatedWidget(int route_id, 117 virtual void ShowCreatedWidget(int route_id,
112 const gfx::Rect& initial_pos) OVERRIDE; 118 const gfx::Rect& initial_pos) OVERRIDE;
113 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; 119 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE;
114 virtual void ShowContextMenu( 120 virtual void ShowContextMenu(
115 const ContextMenuParams& params, 121 const ContextMenuParams& params,
116 ContextMenuSourceType type) OVERRIDE; 122 ContextMenuSourceType type) OVERRIDE;
117 123
124 #if defined(OS_ANDROID)
125 virtual void AttachLayer(WebKit::WebLayer* layer) OVERRIDE;
126 virtual void RemoveLayer(WebKit::WebLayer* layer) OVERRIDE;
127 #endif
128
118 // RenderWidgetHostDelegate implementation: 129 // RenderWidgetHostDelegate implementation:
119 virtual void RenderWidgetDeleted( 130 virtual void RenderWidgetDeleted(
120 RenderWidgetHostImpl* render_widget_host) OVERRIDE; 131 RenderWidgetHostImpl* render_widget_host) OVERRIDE;
121 virtual bool PreHandleKeyboardEvent( 132 virtual bool PreHandleKeyboardEvent(
122 const NativeWebKeyboardEvent& event, 133 const NativeWebKeyboardEvent& event,
123 bool* is_keyboard_shortcut) OVERRIDE; 134 bool* is_keyboard_shortcut) OVERRIDE;
124 virtual void HandleKeyboardEvent( 135 virtual void HandleKeyboardEvent(
125 const NativeWebKeyboardEvent& event) OVERRIDE; 136 const NativeWebKeyboardEvent& event) OVERRIDE;
126 137
127 bool enabled() const { return enabled_; } 138 bool enabled() const { return enabled_; }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 scoped_ptr<InterstitialPageDelegate> delegate_; 228 scoped_ptr<InterstitialPageDelegate> delegate_;
218 229
219 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; 230 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
220 231
221 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); 232 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl);
222 }; 233 };
223 234
224 } // namespace content 235 } // namespace content
225 236
226 #endif // CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_ 237 #endif // CONTENT_BROWSER_WEB_CONTENTS_INTERSTITIAL_PAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698