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

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

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review (kalman) Created 7 years, 6 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/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // DEPRECATED. 29 // DEPRECATED.
30 // 30 //
31 // This is a base class for chrome extension bindings. Common features that 31 // This is a base class for chrome extension bindings. Common features that
32 // are shared by different modules go here. 32 // are shared by different modules go here.
33 // 33 //
34 // TODO(kalman): Delete this class entirely, it has no value anymore. 34 // TODO(kalman): Delete this class entirely, it has no value anymore.
35 // Custom bindings should extend ObjectBackedNativeHandler. 35 // Custom bindings should extend ObjectBackedNativeHandler.
36 class ChromeV8Extension : public ObjectBackedNativeHandler { 36 class ChromeV8Extension : public ObjectBackedNativeHandler {
37 public: 37 public:
38 ChromeV8Extension(Dispatcher* dispatcher, v8::Handle<v8::Context> context); 38 ChromeV8Extension(Dispatcher* dispatcher, ChromeV8Context* context);
39 virtual ~ChromeV8Extension(); 39 virtual ~ChromeV8Extension();
40 40
41 Dispatcher* dispatcher() { return dispatcher_; } 41 Dispatcher* dispatcher() { return dispatcher_; }
42 42
43 ChromeV8Context* GetContext(); 43 ChromeV8Context* GetContext();
44 44
45 // Shortcuts through to the context's render view and extension. 45 // Shortcuts through to the context's render view and extension.
46 content::RenderView* GetRenderView(); 46 content::RenderView* GetRenderView();
47 const Extension* GetExtensionForRenderView(); 47 const Extension* GetExtensionForRenderView();
48 48
49 protected: 49 protected:
50 Dispatcher* dispatcher_; 50 Dispatcher* dispatcher_;
51 51
52 private: 52 private:
53 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension); 53 DISALLOW_COPY_AND_ASSIGN(ChromeV8Extension);
54 }; 54 };
55 55
56 } // namespace extensions 56 } // namespace extensions
57 57
58 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_ 58 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698