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

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

Issue 798723004: Fix copying from interstitial pages on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Verified test. Created 5 years, 8 months 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
OLDNEW
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
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 RenderFrameHost* GetMainFrame() const override; 64 RenderFrameHost* GetMainFrame() const override;
65 InterstitialPageDelegate* GetDelegateForTesting() override; 65 InterstitialPageDelegate* GetDelegateForTesting() override;
66 WebContents* GetAsWebContents() override;
nasko 2015/04/22 05:07:45 This doesn't seem right. This is not a WebContents
lgarron 2015/04/22 07:19:54 I think we have to do this to overwrite RenderView
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.
76 // Called when tab traversing. 77 // Called when tab traversing.
77 void FocusThroughTabTraversal(bool reverse); 78 void FocusThroughTabTraversal(bool reverse);
78 79
79 RenderWidgetHostView* GetView(); 80 RenderWidgetHostView* GetView();
80 81
81 // See description above field. 82 // See description above field.
82 void set_reload_on_dont_proceed(bool value) { 83 void set_reload_on_dont_proceed(bool value) {
83 reload_on_dont_proceed_ = value; 84 reload_on_dont_proceed_ = value;
84 } 85 }
85 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } 86 bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; }
86 87
87 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in 88 // TODO(nasko): This should move to InterstitialPageNavigatorImpl, but in
88 // the meantime make it public, so it can be called directly. 89 // the meantime make it public, so it can be called directly.
89 void DidNavigate( 90 void DidNavigate(
90 RenderViewHost* render_view_host, 91 RenderViewHost* render_view_host,
91 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 92 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
93 FrameTree* GetFrameTree() override;
nasko 2015/04/22 05:07:45 Why do you need to expose this? Can't we use GetMa
lgarron 2015/04/22 07:19:53 This is what we came up with when we originally ma
92 94
93 protected: 95 protected:
94 // NotificationObserver method: 96 // NotificationObserver method:
95 void Observe(int type, 97 void Observe(int type,
96 const NotificationSource& source, 98 const NotificationSource& source,
97 const NotificationDetails& details) override; 99 const NotificationDetails& details) override;
98 100
99 // RenderFrameHostDelegate implementation: 101 // RenderFrameHostDelegate implementation:
100 bool OnMessageReceived(RenderFrameHost* render_frame_host, 102 bool OnMessageReceived(RenderFrameHost* render_frame_host,
101 const IPC::Message& message) override; 103 const IPC::Message& message) override;
(...skipping 28 matching lines...) Expand all
130 void ShowCreatedWindow(int route_id, 132 void ShowCreatedWindow(int route_id,
131 WindowOpenDisposition disposition, 133 WindowOpenDisposition disposition,
132 const gfx::Rect& initial_rect, 134 const gfx::Rect& initial_rect,
133 bool user_gesture) override; 135 bool user_gesture) override;
134 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_rect) override; 136 void ShowCreatedWidget(int route_id, const gfx::Rect& initial_rect) override;
135 void ShowCreatedFullscreenWidget(int route_id) override; 137 void ShowCreatedFullscreenWidget(int route_id) override;
136 138
137 SessionStorageNamespace* GetSessionStorageNamespace( 139 SessionStorageNamespace* GetSessionStorageNamespace(
138 SiteInstance* instance) override; 140 SiteInstance* instance) override;
139 141
140 FrameTree* GetFrameTree() override;
141
142 // RenderWidgetHostDelegate implementation: 142 // RenderWidgetHostDelegate implementation:
143 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override; 143 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override;
144 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 144 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
145 bool* is_keyboard_shortcut) override; 145 bool* is_keyboard_shortcut) override;
146 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override; 146 void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override;
147 #if defined(OS_WIN) 147 #if defined(OS_WIN)
148 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override; 148 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() override;
149 #endif 149 #endif
150 150
151 bool enabled() const { return enabled_; } 151 bool enabled() const { return enabled_; }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; 287 scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
288 288
289 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; 289 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
290 290
291 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); 291 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl);
292 }; 292 };
293 293
294 } // namespace content 294 } // namespace content
295 295
296 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ 296 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698