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

Side by Side Diff: content/public/renderer/render_view_observer.h

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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) 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_RENDERER_RENDER_VIEW_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ipc/ipc_listener.h" 11 #include "ipc/ipc_listener.h"
12 #include "ipc/ipc_sender.h" 12 #include "ipc/ipc_sender.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h"
14 14
15 class RenderViewImpl;
16
17 namespace ppapi { 15 namespace ppapi {
18 namespace host { 16 namespace host {
19 class PpapiHost; 17 class PpapiHost;
20 } 18 }
21 } 19 }
22 20
23 namespace WebKit { 21 namespace WebKit {
24 class WebDataSource; 22 class WebDataSource;
25 class WebFrame; 23 class WebFrame;
26 class WebFormElement; 24 class WebFormElement;
27 class WebMediaPlayerClient; 25 class WebMediaPlayerClient;
28 class WebMouseEvent; 26 class WebMouseEvent;
29 class WebNode; 27 class WebNode;
30 class WebTouchEvent; 28 class WebTouchEvent;
31 class WebURL; 29 class WebURL;
32 struct WebURLError; 30 struct WebURLError;
33 } 31 }
34 32
35 namespace content { 33 namespace content {
36 34
37 class RendererPpapiHost; 35 class RendererPpapiHost;
38 class RenderView; 36 class RenderView;
37 class RenderViewImpl;
39 38
40 // Base class for objects that want to filter incoming IPCs, and also get 39 // Base class for objects that want to filter incoming IPCs, and also get
41 // notified of changes to the frame. 40 // notified of changes to the frame.
42 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, 41 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener,
43 public IPC::Sender { 42 public IPC::Sender {
44 public: 43 public:
45 // By default, observers will be deleted when the RenderView goes away. If 44 // By default, observers will be deleted when the RenderView goes away. If
46 // they want to outlive it, they can override this function. 45 // they want to outlive it, they can override this function.
47 virtual void OnDestruct(); 46 virtual void OnDestruct();
48 47
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 explicit RenderViewObserver(RenderView* render_view); 99 explicit RenderViewObserver(RenderView* render_view);
101 virtual ~RenderViewObserver(); 100 virtual ~RenderViewObserver();
102 101
103 // IPC::Sender implementation. 102 // IPC::Sender implementation.
104 virtual bool Send(IPC::Message* message) OVERRIDE; 103 virtual bool Send(IPC::Message* message) OVERRIDE;
105 104
106 RenderView* render_view(); 105 RenderView* render_view();
107 int routing_id() { return routing_id_; } 106 int routing_id() { return routing_id_; }
108 107
109 private: 108 private:
110 friend class ::RenderViewImpl; 109 friend class RenderViewImpl;
111 110
112 // This is called by the RenderView when it's going away so that this object 111 // This is called by the RenderView when it's going away so that this object
113 // can null out its pointer. 112 // can null out its pointer.
114 void RenderViewGone(); 113 void RenderViewGone();
115 114
116 RenderView* render_view_; 115 RenderView* render_view_;
117 // The routing ID of the associated RenderView. 116 // The routing ID of the associated RenderView.
118 int routing_id_; 117 int routing_id_;
119 118
120 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); 119 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver);
121 }; 120 };
122 121
123 } // namespace content 122 } // namespace content
124 123
125 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 124 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/public/test/render_view_fake_resources_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698