| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // IPC::Listener implementation. | 99 // IPC::Listener implementation. |
| 100 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 100 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 101 | 101 |
| 102 protected: | 102 protected: |
| 103 explicit RenderViewObserver(RenderView* render_view); | 103 explicit RenderViewObserver(RenderView* render_view); |
| 104 virtual ~RenderViewObserver(); | 104 virtual ~RenderViewObserver(); |
| 105 | 105 |
| 106 // IPC::Sender implementation. | 106 // IPC::Sender implementation. |
| 107 virtual bool Send(IPC::Message* message) OVERRIDE; | 107 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 108 | 108 |
| 109 RenderView* render_view(); | 109 RenderView* render_view() const; |
| 110 int routing_id() { return routing_id_; } | 110 int routing_id() { return routing_id_; } |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 friend class RenderViewImpl; | 113 friend class RenderViewImpl; |
| 114 | 114 |
| 115 // This is called by the RenderView when it's going away so that this object | 115 // This is called by the RenderView when it's going away so that this object |
| 116 // can null out its pointer. | 116 // can null out its pointer. |
| 117 void RenderViewGone(); | 117 void RenderViewGone(); |
| 118 | 118 |
| 119 RenderView* render_view_; | 119 RenderView* render_view_; |
| 120 // The routing ID of the associated RenderView. | 120 // The routing ID of the associated RenderView. |
| 121 int routing_id_; | 121 int routing_id_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 123 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace content | 126 } // namespace content |
| 127 | 127 |
| 128 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 128 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |