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

Side by Side Diff: content/renderer/pepper/message_channel.cc

Issue 744723002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "content/renderer/pepper/message_channel.h" 5 #include "content/renderer/pepper/message_channel.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 gin::WrapperInfo MessageChannel::kWrapperInfo = {gin::kEmbedderNativeGin}; 85 gin::WrapperInfo MessageChannel::kWrapperInfo = {gin::kEmbedderNativeGin};
86 86
87 // static 87 // static
88 MessageChannel* MessageChannel::Create(PepperPluginInstanceImpl* instance, 88 MessageChannel* MessageChannel::Create(PepperPluginInstanceImpl* instance,
89 v8::Persistent<v8::Object>* result) { 89 v8::Persistent<v8::Object>* result) {
90 MessageChannel* message_channel = new MessageChannel(instance); 90 MessageChannel* message_channel = new MessageChannel(instance);
91 v8::HandleScope handle_scope(instance->GetIsolate()); 91 v8::HandleScope handle_scope(instance->GetIsolate());
92 v8::Context::Scope context_scope(instance->GetMainWorldContext()); 92 v8::Context::Scope context_scope(instance->GetMainWorldContext());
93 gin::Handle<MessageChannel> handle = 93 gin::Handle<MessageChannel> handle =
94 gin::CreateHandle(instance->GetIsolate(), message_channel); 94 gin::CreateHandle(instance->GetIsolate(), message_channel);
95 result->Reset(instance->GetIsolate(), handle.ToV8()->ToObject()); 95 result->Reset(instance->GetIsolate(),
96 handle.ToV8()->ToObject(instance->GetIsolate()));
96 return message_channel; 97 return message_channel;
97 } 98 }
98 99
99 MessageChannel::~MessageChannel() { 100 MessageChannel::~MessageChannel() {
100 UnregisterSyncMessageStatusObserver(); 101 UnregisterSyncMessageStatusObserver();
101 102
102 passthrough_object_.Reset(); 103 passthrough_object_.Reset();
103 if (instance_) 104 if (instance_)
104 instance_->MessageChannelDestroyed(); 105 instance_->MessageChannelDestroyed();
105 } 106 }
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 462 }
462 463
463 void MessageChannel::UnregisterSyncMessageStatusObserver() { 464 void MessageChannel::UnregisterSyncMessageStatusObserver() {
464 if (!unregister_observer_callback_.is_null()) { 465 if (!unregister_observer_callback_.is_null()) {
465 unregister_observer_callback_.Run(); 466 unregister_observer_callback_.Run();
466 unregister_observer_callback_.Reset(); 467 unregister_observer_callback_.Reset();
467 } 468 }
468 } 469 }
469 470
470 } // namespace content 471 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/chrome_object_extensions_utils.cc ('k') | content/renderer/pepper/v8_var_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698