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

Side by Side Diff: extensions/renderer/user_gestures_native_handler.cc

Issue 1115563002: extensions/renderer: Use v8::Local instead of v8::Handle. (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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/user_gestures_native_handler.h" 5 #include "extensions/renderer/user_gestures_native_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "extensions/renderer/script_context.h" 8 #include "extensions/renderer/script_context.h"
9 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" 9 #include "third_party/WebKit/public/web/WebScopedUserGesture.h"
10 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 10 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
(...skipping 18 matching lines...) Expand all
29 args.GetReturnValue().Set(v8::Boolean::New( 29 args.GetReturnValue().Set(v8::Boolean::New(
30 args.GetIsolate(), 30 args.GetIsolate(),
31 blink::WebUserGestureIndicator::isProcessingUserGesture())); 31 blink::WebUserGestureIndicator::isProcessingUserGesture()));
32 } 32 }
33 33
34 void UserGesturesNativeHandler::RunWithUserGesture( 34 void UserGesturesNativeHandler::RunWithUserGesture(
35 const v8::FunctionCallbackInfo<v8::Value>& args) { 35 const v8::FunctionCallbackInfo<v8::Value>& args) {
36 blink::WebScopedUserGesture user_gesture; 36 blink::WebScopedUserGesture user_gesture;
37 CHECK_EQ(args.Length(), 1); 37 CHECK_EQ(args.Length(), 1);
38 CHECK(args[0]->IsFunction()); 38 CHECK(args[0]->IsFunction());
39 v8::Handle<v8::Value> no_args; 39 v8::Local<v8::Value> no_args;
40 context()->CallFunction(v8::Handle<v8::Function>::Cast(args[0]), 0, &no_args); 40 context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args);
41 } 41 }
42 42
43 void UserGesturesNativeHandler::RunWithoutUserGesture( 43 void UserGesturesNativeHandler::RunWithoutUserGesture(
44 const v8::FunctionCallbackInfo<v8::Value>& args) { 44 const v8::FunctionCallbackInfo<v8::Value>& args) {
45 blink::WebUserGestureIndicator::consumeUserGesture(); 45 blink::WebUserGestureIndicator::consumeUserGesture();
46 CHECK_EQ(args.Length(), 1); 46 CHECK_EQ(args.Length(), 1);
47 CHECK(args[0]->IsFunction()); 47 CHECK(args[0]->IsFunction());
48 v8::Handle<v8::Value> no_args; 48 v8::Local<v8::Value> no_args;
49 context()->CallFunction(v8::Handle<v8::Function>::Cast(args[0]), 0, &no_args); 49 context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args);
50 } 50 }
51 51
52 } // namespace extensions 52 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/send_request_natives.cc ('k') | extensions/renderer/utils_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698