Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: chrome/renderer/extensions/chrome_v8_extension.h

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more progress Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
11 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h" 11 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h"
12 #include "chrome/renderer/extensions/native_handler.h" 12 #include "chrome/renderer/extensions/object_backed_native_handler.h"
13 #include "v8/include/v8.h" 13 #include "v8/include/v8.h"
14 14
15 #include <map> 15 #include <map>
16 #include <set> 16 #include <set>
17 #include <string> 17 #include <string>
18 18
19 19
20 namespace content { 20 namespace content {
21 class RenderView; 21 class RenderView;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 class ChromeV8Context; 25 class ChromeV8Context;
26 class Dispatcher; 26 class Dispatcher;
27 class Extension; 27 class Extension;
28 28
29 // This is a base class for chrome extension bindings. Common features that 29 // This is a base class for chrome extension bindings. Common features that
30 // are shared by different modules go here. 30 // are shared by different modules go here.
31 // TODO(koz): Rename this to ExtensionNativeModule. 31 // TODO(koz): Rename this to ExtensionNativeModule.
32 class ChromeV8Extension : public NativeHandler { 32 class ChromeV8Extension : public ObjectBackedNativeHandler {
33 public: 33 public:
34 typedef std::set<ChromeV8Extension*> InstanceSet; 34 typedef std::set<ChromeV8Extension*> InstanceSet;
35 static const InstanceSet& GetAll(); 35 static const InstanceSet& GetAll();
36 36
37 explicit ChromeV8Extension(Dispatcher* dispatcher); 37 explicit ChromeV8Extension(Dispatcher* dispatcher);
38 virtual ~ChromeV8Extension(); 38 virtual ~ChromeV8Extension();
39 39
40 Dispatcher* dispatcher() { return dispatcher_; } 40 Dispatcher* dispatcher() { return dispatcher_; }
41 41
42 protected: 42 protected:
(...skipping 17 matching lines...) Expand all
60 60
61 Dispatcher* dispatcher_; 61 Dispatcher* dispatcher_;
62 62
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension); 64 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension);
65 }; 65 };
66 66
67 } // namespace extensions 67 } // namespace extensions
68 68
69 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 69 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698