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

Side by Side Diff: gin/public/context_holder.h

Issue 1112923003: Replace Handle<> with Local in remaining gin/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « gin/per_context_data_unittest.cc ('k') | gin/public/wrapper_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 GIN_PUBLIC_CONTEXT_HOLDER_H_ 5 #ifndef GIN_PUBLIC_CONTEXT_HOLDER_H_
6 #define GIN_PUBLIC_CONTEXT_HOLDER_H_ 6 #define GIN_PUBLIC_CONTEXT_HOLDER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 class PerContextData; 26 class PerContextData;
27 27
28 // ContextHolder is a generic class for holding a v8::Context. 28 // ContextHolder is a generic class for holding a v8::Context.
29 class GIN_EXPORT ContextHolder { 29 class GIN_EXPORT ContextHolder {
30 public: 30 public:
31 explicit ContextHolder(v8::Isolate* isolate); 31 explicit ContextHolder(v8::Isolate* isolate);
32 ~ContextHolder(); 32 ~ContextHolder();
33 33
34 v8::Isolate* isolate() const { return isolate_; } 34 v8::Isolate* isolate() const { return isolate_; }
35 35
36 v8::Handle<v8::Context> context() const { 36 v8::Local<v8::Context> context() const {
37 return v8::Local<v8::Context>::New(isolate_, context_); 37 return v8::Local<v8::Context>::New(isolate_, context_);
38 } 38 }
39 39
40 void SetContext(v8::Handle<v8::Context> context); 40 void SetContext(v8::Local<v8::Context> context);
41 41
42 private: 42 private:
43 v8::Isolate* isolate_; 43 v8::Isolate* isolate_;
44 v8::UniquePersistent<v8::Context> context_; 44 v8::UniquePersistent<v8::Context> context_;
45 scoped_ptr<PerContextData> data_; 45 scoped_ptr<PerContextData> data_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(ContextHolder); 47 DISALLOW_COPY_AND_ASSIGN(ContextHolder);
48 }; 48 };
49 49
50 } // namespace gin 50 } // namespace gin
51 51
52 #endif // GIN_PUBLIC_CONTEXT_HOLDER_H_ 52 #endif // GIN_PUBLIC_CONTEXT_HOLDER_H_
OLDNEW
« no previous file with comments | « gin/per_context_data_unittest.cc ('k') | gin/public/wrapper_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698