blob: e10a9826113b43057ea454f5073d544d26ae3dd9 [file] [log] [blame]
[email protected]81914ad2013-07-02 18:54:251// 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
tfarinabccc34c72015-02-27 21:32:155#ifndef CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_
6#define CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_
[email protected]81914ad2013-07-02 18:54:257
[email protected]9cd36bfb2014-08-20 00:32:008#include <string>
9#include "base/memory/scoped_ptr.h"
[email protected]81914ad2013-07-02 18:54:2510#include "content/public/renderer/render_view_observer.h"
11
[email protected]180ef242013-11-07 06:50:4612namespace blink {
[email protected]81914ad2013-07-02 18:54:2513class WebFrame;
14}
15
16namespace content {
17
[email protected]9cd36bfb2014-08-20 00:32:0018class IPCEcho;
[email protected]81914ad2013-07-02 18:54:2519class RenderView;
20
21
22class ShellRenderViewObserver : public RenderViewObserver {
23 public:
24 explicit ShellRenderViewObserver(RenderView* render_view);
dchenge933b3e2014-10-21 11:44:0925 ~ShellRenderViewObserver() override;
[email protected]81914ad2013-07-02 18:54:2526
27 private:
[email protected]9cd36bfb2014-08-20 00:32:0028 // Message handlers.
29 void OnEchoPong(int id, const std::string& body);
30
[email protected]81914ad2013-07-02 18:54:2531 // RenderViewObserver implementation.
dchenge933b3e2014-10-21 11:44:0932 bool OnMessageReceived(const IPC::Message& message) override;
33 void DidClearWindowObject(blink::WebLocalFrame* frame) override;
[email protected]81914ad2013-07-02 18:54:2534
[email protected]9cd36bfb2014-08-20 00:32:0035 scoped_ptr<IPCEcho> ipc_echo_;
[email protected]81914ad2013-07-02 18:54:2536 DISALLOW_COPY_AND_ASSIGN(ShellRenderViewObserver);
37};
38
39} // namespace content
40
tfarinabccc34c72015-02-27 21:32:1541#endif // CONTENT_SHELL_RENDERER_SHELL_RENDER_VIEW_OBSERVER_H_