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

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 11231077: Move a bunch more code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 #include "content/public/common/page_transition_types.h" 12 #include "content/public/common/page_transition_types.h"
13 #include "ipc/ipc_listener.h" 13 #include "ipc/ipc_listener.h"
14 #include "ipc/ipc_sender.h" 14 #include "ipc/ipc_sender.h"
15 #include "webkit/glue/window_open_disposition.h" 15 #include "webkit/glue/window_open_disposition.h"
16 16
17 class WebContentsImpl;
18
19 namespace content { 17 namespace content {
20 18
21 class RenderViewHost; 19 class RenderViewHost;
22 class WebContents; 20 class WebContents;
21 class WebContentsImpl;
23 struct FrameNavigateParams; 22 struct FrameNavigateParams;
24 struct LoadCommittedDetails; 23 struct LoadCommittedDetails;
25 struct Referrer; 24 struct Referrer;
26 25
27 // An observer API implemented by classes which are interested in various page 26 // An observer API implemented by classes which are interested in various page
28 // load events from WebContents. They also get a chance to filter IPC messages. 27 // load events from WebContents. They also get a chance to filter IPC messages.
29 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, 28 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
30 public IPC::Sender { 29 public IPC::Sender {
31 public: 30 public:
32 // Only one of the two methods below will be called when a RVH is created for 31 // Only one of the two methods below will be called when a RVH is created for
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 WebContentsObserver(); 167 WebContentsObserver();
169 168
170 virtual ~WebContentsObserver(); 169 virtual ~WebContentsObserver();
171 170
172 // Start observing a different WebContents; used with the default constructor. 171 // Start observing a different WebContents; used with the default constructor.
173 void Observe(WebContents* web_contents); 172 void Observe(WebContents* web_contents);
174 173
175 WebContents* web_contents() const; 174 WebContents* web_contents() const;
176 175
177 private: 176 private:
178 friend class ::WebContentsImpl; 177 friend class WebContentsImpl;
179 178
180 // Invoked from WebContentsImpl. Invokes WebContentsDestroyed and NULL out 179 // Invoked from WebContentsImpl. Invokes WebContentsDestroyed and NULL out
181 // |web_contents_|. 180 // |web_contents_|.
182 void WebContentsImplDestroyed(); 181 void WebContentsImplDestroyed();
183 182
184 WebContentsImpl* web_contents_; 183 WebContentsImpl* web_contents_;
185 184
186 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 185 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
187 }; 186 };
188 187
189 } // namespace content 188 } // namespace content
190 189
191 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 190 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | content/renderer/media/mock_peer_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698