Roll src/third_party/skia a6ae14e:85693c1
[chromium-blink-merge.git] / chrome / renderer / extensions / chrome_v8_extension_handler.h
blobb2a1572f08e0be67b08e93c47e9125619ab10880
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
3 // found in the LICENSE file.
5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_HANDLER_H_
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_HANDLER_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "ipc/ipc_listener.h"
12 #include "v8/include/v8.h"
14 namespace extensions {
16 // Base class for context-scoped handlers used with ChromeV8Extension.
17 // TODO(koz): Rename/refactor this somehow. Maybe just pull it into
18 // ChromeV8Extension.
19 class ChromeV8ExtensionHandler : public IPC::Listener {
20 public:
21 ~ChromeV8ExtensionHandler() override;
23 // IPC::Listener
24 bool OnMessageReceived(const IPC::Message& message) override = 0;
26 protected:
27 ChromeV8ExtensionHandler();
28 int GetRoutingID();
29 void Send(IPC::Message* message);
31 private:
32 int routing_id_;
33 DISALLOW_COPY_AND_ASSIGN(ChromeV8ExtensionHandler);
36 } // namespace extensions
38 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_HANDLER_H_