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

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

Issue 532833003: content/ fixups for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/renderer/media/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ppb_var_deprecated_impl.h" 5 #include "content/renderer/pepper/ppb_var_deprecated_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "content/renderer/pepper/host_globals.h" 9 #include "content/renderer/pepper/host_globals.h"
10 #include "content/renderer/pepper/message_channel.h" 10 #include "content/renderer/pepper/message_channel.h"
(...skipping 22 matching lines...) Expand all
33 33
34 namespace { 34 namespace {
35 35
36 const char kInvalidIdentifierException[] = "Error: Invalid identifier."; 36 const char kInvalidIdentifierException[] = "Error: Invalid identifier.";
37 const char kInvalidObjectException[] = "Error: Invalid object"; 37 const char kInvalidObjectException[] = "Error: Invalid object";
38 const char kUnableToCallMethodException[] = "Error: Unable to call method"; 38 const char kUnableToCallMethodException[] = "Error: Unable to call method";
39 39
40 class ObjectAccessor { 40 class ObjectAccessor {
41 public: 41 public:
42 ObjectAccessor(PP_Var var) 42 ObjectAccessor(PP_Var var)
43 : object_var_(V8ObjectVar::FromPPVar(var)), 43 : object_var_(V8ObjectVar::FromPPVar(var).get()),
dcheng 2014/09/02 23:53:41 Note: I'm not sure if this is safe or not. I've cc
raymes 2014/09/03 00:02:25 This is safe. You might hit a conflict because thi
dcheng 2014/09/03 00:04:20 Ha. OK, thanks. I'll pre-emptively revert this cha
44 instance_(object_var_ ? object_var_->instance() : NULL) { 44 instance_(object_var_ ? object_var_->instance() : NULL) {
45 } 45 }
46 46
47 // Check if the object is valid. If it isn't, set an exception and return 47 // Check if the object is valid. If it isn't, set an exception and return
48 // false. 48 // false.
49 bool IsValid(PP_Var* exception) { 49 bool IsValid(PP_Var* exception) {
50 // If we already have an exception, then the call is invalid according to 50 // If we already have an exception, then the call is invalid according to
51 // the unittests. 51 // the unittests.
52 if (exception && exception->type != PP_VARTYPE_UNDEFINED) 52 if (exception && exception->type != PP_VARTYPE_UNDEFINED)
53 return false; 53 return false;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 &CallDeprecated, 342 &CallDeprecated,
343 &Construct, 343 &Construct,
344 &IsInstanceOfDeprecated, 344 &IsInstanceOfDeprecated,
345 &CreateObjectDeprecated, 345 &CreateObjectDeprecated,
346 &CreateObjectWithModuleDeprecated, }; 346 &CreateObjectWithModuleDeprecated, };
347 347
348 return &var_deprecated_interface; 348 return &var_deprecated_interface;
349 } 349 }
350 350
351 } // namespace content 351 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698