Chromium Code Reviews| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 | 113 |
| 114 // IPC::Sender implementation. | 114 // IPC::Sender implementation. |
| 115 virtual bool Send(IPC::Message* message) OVERRIDE; | 115 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 116 | 116 |
| 117 RenderView* render_view() const; | 117 RenderView* render_view() const; |
| 118 int routing_id() const { return routing_id_; } | 118 int routing_id() const { return routing_id_; } |
| 119 | 119 |
| 120 protected: | 120 protected: |
| 121 explicit RenderViewObserver(RenderView* render_view); | 121 explicit RenderViewObserver(RenderView* render_view); |
| 122 virtual ~RenderViewObserver(); | 122 virtual ~RenderViewObserver(); |
| 123 void SetRenderView(RenderView* render_view); | |
|
jochen (gone - plz use gerrit)
2014/06/03 12:52:25
please add a comment explaining this API
ostap
2014/06/03 15:32:32
Done.
| |
| 123 | 124 |
| 124 private: | 125 private: |
| 125 friend class RenderViewImpl; | 126 friend class RenderViewImpl; |
| 126 | 127 |
| 127 // This is called by the RenderView when it's going away so that this object | 128 // This is called by the RenderView when it's going away so that this object |
| 128 // can null out its pointer. | 129 // can null out its pointer. |
| 129 void RenderViewGone(); | 130 void RenderViewGone(); |
| 130 | 131 |
| 131 RenderView* render_view_; | 132 RenderView* render_view_; |
| 132 // The routing ID of the associated RenderView. | 133 // The routing ID of the associated RenderView. |
| 133 int routing_id_; | 134 int routing_id_; |
| 134 | 135 |
| 135 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 136 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 } // namespace content | 139 } // namespace content |
| 139 | 140 |
| 140 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 141 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |