Suppression for crbug/241044.
[chromium-blink-merge.git] / chrome / renderer / extensions / chrome_v8_extension.h
blobb6fc050f262fd266079e7a7261127283c153100f
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_H_
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
8 #include "base/logging.h"
9 #include "base/memory/linked_ptr.h"
10 #include "base/strings/string_piece.h"
11 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h"
12 #include "chrome/renderer/extensions/object_backed_native_handler.h"
13 #include "v8/include/v8.h"
15 #include <map>
16 #include <set>
17 #include <string>
20 namespace content {
21 class RenderView;
24 namespace extensions {
25 class ChromeV8Context;
26 class Dispatcher;
27 class Extension;
29 // DEPRECATED.
31 // This is a base class for chrome extension bindings. Common features that
32 // are shared by different modules go here.
34 // TODO(kalman): Delete this class entirely, it has no value anymore.
35 // Custom bindings should extend ObjectBackedNativeHandler.
36 class ChromeV8Extension : public ObjectBackedNativeHandler {
37 public:
38 ChromeV8Extension(Dispatcher* dispatcher, v8::Handle<v8::Context> context);
39 virtual ~ChromeV8Extension();
41 Dispatcher* dispatcher() { return dispatcher_; }
43 ChromeV8Context* GetContext();
45 // Shortcuts through to the context's render view and extension.
46 content::RenderView* GetRenderView();
47 const Extension* GetExtensionForRenderView();
49 protected:
50 Dispatcher* dispatcher_;
52 private:
53 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension);
56 } // namespace extensions
58 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_