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

Side by Side Diff: extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Re-add dropped null check Created 4 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
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/messaging_bindings.cc » ('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 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/guest_view/guest_view_internal_custom_bindings.h" 5 #include "extensions/renderer/guest_view/guest_view_internal_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 // Let the GuestViewManager know that a GuestView has been created. 421 // Let the GuestViewManager know that a GuestView has been created.
422 const std::string& view_type = *v8::String::Utf8Value(args[2]); 422 const std::string& view_type = *v8::String::Utf8Value(args[2]);
423 content::RenderThread::Get()->Send( 423 content::RenderThread::Get()->Send(
424 new GuestViewHostMsg_ViewCreated(view_instance_id, view_type)); 424 new GuestViewHostMsg_ViewCreated(view_instance_id, view_type));
425 } 425 }
426 426
427 void GuestViewInternalCustomBindings::RunWithGesture( 427 void GuestViewInternalCustomBindings::RunWithGesture(
428 const v8::FunctionCallbackInfo<v8::Value>& args) { 428 const v8::FunctionCallbackInfo<v8::Value>& args) {
429 // Gesture is required to request fullscreen. 429 // Gesture is required to request fullscreen.
430 blink::WebScopedUserGesture user_gesture; 430 blink::WebScopedUserGesture user_gesture(context()->web_frame());
431 CHECK_EQ(args.Length(), 1); 431 CHECK_EQ(args.Length(), 1);
432 CHECK(args[0]->IsFunction()); 432 CHECK(args[0]->IsFunction());
433 v8::Local<v8::Value> no_args; 433 v8::Local<v8::Value> no_args;
434 context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args); 434 context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args);
435 } 435 }
436 436
437 } // namespace extensions 437 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698