| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ | 5 #ifndef CONTENT_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ |
| 6 #define CONTENT_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ | 6 #define CONTENT_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 class WebFrame; | 13 class WebFrame; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class IPCEcho; | 18 class IPCEcho; |
| 19 class RenderView; | 19 class RenderView; |
| 20 | 20 |
| 21 | 21 |
| 22 class ShellRenderViewObserver : public RenderViewObserver { | 22 class ShellRenderViewObserver : public RenderViewObserver { |
| 23 public: | 23 public: |
| 24 explicit ShellRenderViewObserver(RenderView* render_view); | 24 explicit ShellRenderViewObserver(RenderView* render_view); |
| 25 virtual ~ShellRenderViewObserver(); | 25 ~ShellRenderViewObserver() override; |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 // Message handlers. | 28 // Message handlers. |
| 29 void OnEchoPong(int id, const std::string& body); | 29 void OnEchoPong(int id, const std::string& body); |
| 30 | 30 |
| 31 // RenderViewObserver implementation. | 31 // RenderViewObserver implementation. |
| 32 virtual bool OnMessageReceived(const IPC::Message& message) override; | 32 bool OnMessageReceived(const IPC::Message& message) override; |
| 33 virtual void DidClearWindowObject(blink::WebLocalFrame* frame) override; | 33 void DidClearWindowObject(blink::WebLocalFrame* frame) override; |
| 34 | 34 |
| 35 scoped_ptr<IPCEcho> ipc_echo_; | 35 scoped_ptr<IPCEcho> ipc_echo_; |
| 36 DISALLOW_COPY_AND_ASSIGN(ShellRenderViewObserver); | 36 DISALLOW_COPY_AND_ASSIGN(ShellRenderViewObserver); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace content | 39 } // namespace content |
| 40 | 40 |
| 41 #endif // CONTENT_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ | 41 #endif // CONTENT_SHELL_SHELL_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |