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

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

Issue 11411180: move favicon download code from chrome/ into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix order Created 8 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
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/common/favicon_url.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/process_util.h" 8 #include "base/process_util.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/common/page_transition_types.h" 11 #include "content/public/common/page_transition_types.h"
12 #include "content/public/common/three_d_api_types.h" 12 #include "content/public/common/three_d_api_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 namespace content { 17 namespace content {
18 18
19 class RenderViewHost; 19 class RenderViewHost;
20 class WebContents; 20 class WebContents;
21 class WebContentsImpl; 21 class WebContentsImpl;
22 struct FaviconURL;
22 struct FrameNavigateParams; 23 struct FrameNavigateParams;
23 struct LoadCommittedDetails; 24 struct LoadCommittedDetails;
24 struct Referrer; 25 struct Referrer;
25 26
26 // An observer API implemented by classes which are interested in various page 27 // An observer API implemented by classes which are interested in various page
27 // load events from WebContents. They also get a chance to filter IPC messages. 28 // load events from WebContents. They also get a chance to filter IPC messages.
28 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, 29 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
29 public IPC::Sender { 30 public IPC::Sender {
30 public: 31 public:
31 // Only one of the two methods below will be called when a RVH is created for 32 // Only one of the two methods below will be called when a RVH is created for
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 // Called when the user agent override for a WebContents has been changed. 137 // Called when the user agent override for a WebContents has been changed.
137 virtual void UserAgentOverrideSet(const std::string& user_agent) {} 138 virtual void UserAgentOverrideSet(const std::string& user_agent) {}
138 139
139 // Indicates that client 3D APIs (Pepper 3D, WebGL) were just 140 // Indicates that client 3D APIs (Pepper 3D, WebGL) were just
140 // blocked on the current page, specifically because the GPU was 141 // blocked on the current page, specifically because the GPU was
141 // reset recently. 142 // reset recently.
142 virtual void DidBlock3DAPIs(const GURL& url, 143 virtual void DidBlock3DAPIs(const GURL& url,
143 ThreeDAPIType requester) {} 144 ThreeDAPIType requester) {}
144 145
146 // Invoked when new FaviconURL candidates are received from the renderer.
147 virtual void DidUpdateFaviconURL(int32 page_id,
148 const std::vector<FaviconURL>& candidates) {}
149
145 // IPC::Listener implementation. 150 // IPC::Listener implementation.
146 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 151 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
147 152
148 // IPC::Sender implementation. 153 // IPC::Sender implementation.
149 virtual bool Send(IPC::Message* message) OVERRIDE; 154 virtual bool Send(IPC::Message* message) OVERRIDE;
150 int routing_id() const; 155 int routing_id() const;
151 156
152 protected: 157 protected:
153 // Use this constructor when the object is tied to a single WebContents for 158 // Use this constructor when the object is tied to a single WebContents for
154 // its entire lifetime. 159 // its entire lifetime.
(...skipping 19 matching lines...) Expand all
174 void WebContentsImplDestroyed(); 179 void WebContentsImplDestroyed();
175 180
176 WebContentsImpl* web_contents_; 181 WebContentsImpl* web_contents_;
177 182
178 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 183 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
179 }; 184 };
180 185
181 } // namespace content 186 } // namespace content
182 187
183 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 188 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents.h ('k') | content/public/common/favicon_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698