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

Side by Side Diff: chrome/renderer/extensions/chrome_v8_context.cc

Issue 61383003: Pass pepper apps API calls through the existing js apps API bindings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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
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 #include "chrome/renderer/extensions/chrome_v8_context.h" 5 #include "chrome/renderer/extensions/chrome_v8_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 17 matching lines...) Expand all
28 28
29 ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context, 29 ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context,
30 blink::WebFrame* web_frame, 30 blink::WebFrame* web_frame,
31 const Extension* extension, 31 const Extension* extension,
32 Feature::Context context_type) 32 Feature::Context context_type)
33 : v8_context_(v8_context), 33 : v8_context_(v8_context),
34 web_frame_(web_frame), 34 web_frame_(web_frame),
35 extension_(extension), 35 extension_(extension),
36 context_type_(context_type), 36 context_type_(context_type),
37 safe_builtins_(this), 37 safe_builtins_(this),
38 pepper_request_proxy_(this),
38 isolate_(v8_context->GetIsolate()) { 39 isolate_(v8_context->GetIsolate()) {
39 VLOG(1) << "Created context:\n" 40 VLOG(1) << "Created context:\n"
40 << " extension id: " << GetExtensionID() << "\n" 41 << " extension id: " << GetExtensionID() << "\n"
41 << " frame: " << web_frame_ << "\n" 42 << " frame: " << web_frame_ << "\n"
42 << " context type: " << GetContextTypeDescription(); 43 << " context type: " << GetContextTypeDescription();
43 } 44 }
44 45
45 ChromeV8Context::~ChromeV8Context() { 46 ChromeV8Context::~ChromeV8Context() {
46 VLOG(1) << "Destroyed context for extension\n" 47 VLOG(1) << "Destroyed context for extension\n"
47 << " extension id: " << GetExtensionID(); 48 << " extension id: " << GetExtensionID();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // string if a validation error has occured. 155 // string if a validation error has occured.
155 if (DCHECK_IS_ON()) { 156 if (DCHECK_IS_ON()) {
156 if (!retval.IsEmpty() && !retval->IsUndefined()) { 157 if (!retval.IsEmpty() && !retval->IsUndefined()) {
157 std::string error = *v8::String::AsciiValue(retval); 158 std::string error = *v8::String::AsciiValue(retval);
158 DCHECK(false) << error; 159 DCHECK(false) << error;
159 } 160 }
160 } 161 }
161 } 162 }
162 163
163 } // namespace extensions 164 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698