[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
tfarina | bccc34c7 | 2015-02-27 21:32:15 | [diff] [blame^] | 5 | #ifndef CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_ |
6 | #define CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_ | ||||
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 7 | |
[email protected] | 9cd36bfb | 2014-08-20 00:32:00 | [diff] [blame] | 8 | #include <string> |
9 | #include "base/memory/scoped_ptr.h" | ||||
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 10 | #include "content/public/renderer/render_view_observer.h" |
11 | |||||
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 12 | namespace blink { |
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 13 | class WebFrame; |
14 | } | ||||
15 | |||||
16 | namespace content { | ||||
17 | |||||
[email protected] | 9cd36bfb | 2014-08-20 00:32:00 | [diff] [blame] | 18 | class IPCEcho; |
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 19 | class RenderView; |
20 | |||||
21 | |||||
22 | class ShellRenderViewObserver : public RenderViewObserver { | ||||
23 | public: | ||||
24 | explicit ShellRenderViewObserver(RenderView* render_view); | ||||
dcheng | e933b3e | 2014-10-21 11:44:09 | [diff] [blame] | 25 | ~ShellRenderViewObserver() override; |
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 26 | |
27 | private: | ||||
[email protected] | 9cd36bfb | 2014-08-20 00:32:00 | [diff] [blame] | 28 | // Message handlers. |
29 | void OnEchoPong(int id, const std::string& body); | ||||
30 | |||||
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 31 | // RenderViewObserver implementation. |
dcheng | e933b3e | 2014-10-21 11:44:09 | [diff] [blame] | 32 | bool OnMessageReceived(const IPC::Message& message) override; |
33 | void DidClearWindowObject(blink::WebLocalFrame* frame) override; | ||||
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 34 | |
[email protected] | 9cd36bfb | 2014-08-20 00:32:00 | [diff] [blame] | 35 | scoped_ptr<IPCEcho> ipc_echo_; |
[email protected] | 81914ad | 2013-07-02 18:54:25 | [diff] [blame] | 36 | DISALLOW_COPY_AND_ASSIGN(ShellRenderViewObserver); |
37 | }; | ||||
38 | |||||
39 | } // namespace content | ||||
40 | |||||
tfarina | bccc34c7 | 2015-02-27 21:32:15 | [diff] [blame^] | 41 | #endif // CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_ |