summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_render_view_host_observer.h
blob: c234a1df302392ace7e1aef9992d77d8105375d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_SHELL_SHELL_RENDER_VIEW_HOST_OBSERVER_H_
#define CONTENT_SHELL_SHELL_RENDER_VIEW_HOST_OBSERVER_H_
#pragma once

#include <string>

#include "content/public/browser/render_view_host_observer.h"

namespace content {

class ShellRenderViewHostObserver : public RenderViewHostObserver {
 public:
  explicit ShellRenderViewHostObserver(RenderViewHost* render_view_host);
  virtual ~ShellRenderViewHostObserver();

  // RenderViewHostObserver implementation.
  virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;

 private:
  // Message handlers.
  void OnTextDump(const std::string& dump);

  // layoutTestController handlers.
  void OnNotifyDone();
  void OnDumpAsText();
  void OnDumpChildFramesAsText();
  void OnWaitUntilDone();

  bool dump_child_frames_;

  DISALLOW_COPY_AND_ASSIGN(ShellRenderViewHostObserver);
};

}  // namespace content

#endif  // CONTENT_SHELL_SHELL_RENDER_VIEW_HOST_OBSERVER_H_