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

Side by Side Diff: content/browser/renderer_host/render_view_host_observer.h

Issue 7066039: Remove dependency on PrefChangeRegistrar and renderer_preferences_util from content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 class RenderViewHost; 10 class RenderViewHost;
11 struct ViewMsg_Navigate_Params;
11 12
12 // An observer API implemented by classes which want to filter IPC messages from 13 // An observer API implemented by classes which want to filter IPC messages from
13 // RenderViewHost. 14 // RenderViewHost.
14 class RenderViewHostObserver : public IPC::Channel::Listener, 15 class RenderViewHostObserver : public IPC::Channel::Listener,
15 public IPC::Message::Sender { 16 public IPC::Message::Sender {
16 public: 17 public:
17 18
18 protected: 19 protected:
19 explicit RenderViewHostObserver(RenderViewHost* render_view_host); 20 explicit RenderViewHostObserver(RenderViewHost* render_view_host);
20 21
21 virtual ~RenderViewHostObserver(); 22 virtual ~RenderViewHostObserver();
22 23
23 // Invoked after the RenderViewHost is created in the renderer process. After 24 // Invoked after the RenderViewHost is created in the renderer process. After
24 // this point, messages can be sent to it (or to observers in the renderer). 25 // this point, messages can be sent to it (or to observers in the renderer).
25 virtual void RenderViewHostInitialized(); 26 virtual void RenderViewHostInitialized();
26 27
27 // Invoked when the RenderViewHost is being destroyed. Gives subclasses a 28 // Invoked when the RenderViewHost is being destroyed. Gives subclasses a
28 // chance to cleanup. The base implementation will delete the object. 29 // chance to cleanup. The base implementation will delete the object.
29 virtual void RenderViewHostDestroyed(); 30 virtual void RenderViewHostDestroyed();
30 31
32 // Notifies that a navigation is starting.
33 virtual void Navigate(const ViewMsg_Navigate_Params& params);
34
31 // IPC::Channel::Listener implementation. 35 // IPC::Channel::Listener implementation.
32 virtual bool OnMessageReceived(const IPC::Message& message); 36 virtual bool OnMessageReceived(const IPC::Message& message);
33 37
34 // IPC::Message::Sender implementation. 38 // IPC::Message::Sender implementation.
35 virtual bool Send(IPC::Message* message); 39 virtual bool Send(IPC::Message* message);
36 40
37 RenderViewHost* render_view_host() const { return render_view_host_; } 41 RenderViewHost* render_view_host() const { return render_view_host_; }
38 int routing_id() { return routing_id_; } 42 int routing_id() { return routing_id_; }
39 43
40 private: 44 private:
41 friend class RenderViewHost; 45 friend class RenderViewHost;
42 46
43 // Invoked from RenderViewHost. Invokes RenderViewHostDestroyed and NULL out 47 // Invoked from RenderViewHost. Invokes RenderViewHostDestroyed and NULL out
44 // |render_view_host_|. 48 // |render_view_host_|.
45 void RenderViewHostDestruction(); 49 void RenderViewHostDestruction();
46 50
47 RenderViewHost* render_view_host_; 51 RenderViewHost* render_view_host_;
48 52
49 // The routing ID of the associated RenderViewHost. 53 // The routing ID of the associated RenderViewHost.
50 int routing_id_; 54 int routing_id_;
51 55
52 DISALLOW_COPY_AND_ASSIGN(RenderViewHostObserver); 56 DISALLOW_COPY_AND_ASSIGN(RenderViewHostObserver);
53 }; 57 };
54 58
55 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_ 59 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/renderer_host/render_view_host_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698