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

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

Issue 103633002: Add RenderFrameHostDelegate and plumb it through all the necessary classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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 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"
11 #include "content/browser/frame_host/frame_tree.h" 11 #include "content/browser/frame_host/frame_tree.h"
12 #include "content/browser/frame_host/navigator_delegate.h" 12 #include "content/browser/frame_host/navigator_delegate.h"
13 #include "content/browser/frame_host/render_frame_host_delegate.h"
13 #include "content/browser/renderer_host/render_view_host_delegate.h" 14 #include "content/browser/renderer_host/render_view_host_delegate.h"
14 #include "content/browser/renderer_host/render_widget_host_delegate.h" 15 #include "content/browser/renderer_host/render_widget_host_delegate.h"
15 #include "content/public/browser/interstitial_page.h" 16 #include "content/public/browser/interstitial_page.h"
16 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
18 #include "content/public/browser/web_contents_observer.h" 19 #include "content/public/browser/web_contents_observer.h"
19 #include "content/public/common/renderer_preferences.h" 20 #include "content/public/common/renderer_preferences.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 namespace content { 23 namespace content {
23 class NavigationEntry; 24 class NavigationEntry;
24 class NavigationControllerImpl; 25 class NavigationControllerImpl;
25 class Navigator; 26 class Navigator;
26 class RenderViewHostImpl; 27 class RenderViewHostImpl;
27 class RenderWidgetHostView; 28 class RenderWidgetHostView;
28 class WebContentsView; 29 class WebContentsView;
29 class WebContentsImpl; 30 class WebContentsImpl;
30 31
31 enum ResourceRequestAction { 32 enum ResourceRequestAction {
32 BLOCK, 33 BLOCK,
33 RESUME, 34 RESUME,
34 CANCEL 35 CANCEL
35 }; 36 };
36 37
37 class CONTENT_EXPORT InterstitialPageImpl 38 class CONTENT_EXPORT InterstitialPageImpl
38 : public NON_EXPORTED_BASE(InterstitialPage), 39 : public NON_EXPORTED_BASE(InterstitialPage),
39 public NotificationObserver, 40 public NotificationObserver,
40 public WebContentsObserver, 41 public WebContentsObserver,
42 public NON_EXPORTED_BASE(RenderFrameHostDelegate),
41 public RenderViewHostDelegate, 43 public RenderViewHostDelegate,
42 public RenderWidgetHostDelegate, 44 public RenderWidgetHostDelegate,
43 public NON_EXPORTED_BASE(NavigatorDelegate) { 45 public NON_EXPORTED_BASE(NavigatorDelegate) {
44 public: 46 public:
45 // The different state of actions the user can take in an interstitial. 47 // The different state of actions the user can take in an interstitial.
46 enum ActionState { 48 enum ActionState {
47 NO_ACTION, // No action has been taken yet. 49 NO_ACTION, // No action has been taken yet.
48 PROCEED_ACTION, // "Proceed" was selected. 50 PROCEED_ACTION, // "Proceed" was selected.
49 DONT_PROCEED_ACTION // "Don't proceed" was selected. 51 DONT_PROCEED_ACTION // "Don't proceed" was selected.
50 }; 52 };
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // NotificationObserver method: 96 // NotificationObserver method:
95 virtual void Observe(int type, 97 virtual 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 // WebContentsObserver implementation: 101 // WebContentsObserver implementation:
100 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; 102 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE;
101 virtual void NavigationEntryCommitted( 103 virtual void NavigationEntryCommitted(
102 const LoadCommittedDetails& load_details) OVERRIDE; 104 const LoadCommittedDetails& load_details) OVERRIDE;
103 105
106 // RenderFrameHostDelegate implementation:
107
104 // RenderViewHostDelegate implementation: 108 // RenderViewHostDelegate implementation:
105 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; 109 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE;
106 virtual const GURL& GetURL() const OVERRIDE; 110 virtual const GURL& GetURL() const OVERRIDE;
107 virtual void RenderViewTerminated(RenderViewHost* render_view_host, 111 virtual void RenderViewTerminated(RenderViewHost* render_view_host,
108 base::TerminationStatus status, 112 base::TerminationStatus status,
109 int error_code) OVERRIDE; 113 int error_code) OVERRIDE;
110 virtual void DidNavigate( 114 virtual void DidNavigate(
111 RenderViewHost* render_view_host, 115 RenderViewHost* render_view_host,
112 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; 116 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE;
113 virtual void UpdateTitle(RenderViewHost* render_view_host, 117 virtual void UpdateTitle(RenderViewHost* render_view_host,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_; 265 base::WeakPtrFactory<InterstitialPageImpl> weak_ptr_factory_;
262 266
263 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; 267 scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
264 268
265 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl); 269 DISALLOW_COPY_AND_ASSIGN(InterstitialPageImpl);
266 }; 270 };
267 271
268 } // namespace content 272 } // namespace content
269 273
270 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_ 274 #endif // CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_unittest.cc ('k') | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698