OLD | NEW |
---|---|
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" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 virtual void DidHandleGestureEvent(const WebKit::WebGestureEvent& event) {} | 95 virtual void DidHandleGestureEvent(const WebKit::WebGestureEvent& event) {} |
96 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} | 96 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} |
97 | 97 |
98 // These match incoming IPCs. | 98 // These match incoming IPCs. |
99 virtual void Navigate(const GURL& url) {} | 99 virtual void Navigate(const GURL& url) {} |
100 virtual void ClosePage() {} | 100 virtual void ClosePage() {} |
101 | 101 |
102 // IPC::Listener implementation. | 102 // IPC::Listener implementation. |
103 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 103 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
104 | 104 |
105 protected: | |
106 explicit RenderViewObserver(RenderView* render_view); | |
107 virtual ~RenderViewObserver(); | |
108 | |
109 // IPC::Sender implementation. | 105 // IPC::Sender implementation. |
jam
2013/07/30 01:49:22
i originally wrote this and thought that RVOs migh
| |
110 virtual bool Send(IPC::Message* message) OVERRIDE; | 106 virtual bool Send(IPC::Message* message) OVERRIDE; |
111 | 107 |
112 RenderView* render_view() const; | 108 RenderView* render_view() const; |
113 int routing_id() const { return routing_id_; } | 109 int routing_id() const { return routing_id_; } |
114 | 110 |
111 protected: | |
112 explicit RenderViewObserver(RenderView* render_view); | |
113 virtual ~RenderViewObserver(); | |
114 | |
115 private: | 115 private: |
116 friend class RenderViewImpl; | 116 friend class RenderViewImpl; |
117 | 117 |
118 // This is called by the RenderView when it's going away so that this object | 118 // This is called by the RenderView when it's going away so that this object |
119 // can null out its pointer. | 119 // can null out its pointer. |
120 void RenderViewGone(); | 120 void RenderViewGone(); |
121 | 121 |
122 RenderView* render_view_; | 122 RenderView* render_view_; |
123 // The routing ID of the associated RenderView. | 123 // The routing ID of the associated RenderView. |
124 int routing_id_; | 124 int routing_id_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 126 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace content | 129 } // namespace content |
130 | 130 |
131 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 131 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |