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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1660193007: [Presentation API] Adding a flag to disable gesture check for starting presentations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed philipj@'s comment Created 4 years, 10 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 (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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 prefs.strictly_block_blockable_mixed_content = 520 prefs.strictly_block_blockable_mixed_content =
521 blockable_mixed_content_group == "StrictlyBlockBlockableMixedContent"; 521 blockable_mixed_content_group == "StrictlyBlockBlockableMixedContent";
522 522
523 const std::string plugin_mixed_content_status = 523 const std::string plugin_mixed_content_status =
524 base::FieldTrialList::FindFullName("PluginMixedContentStatus"); 524 base::FieldTrialList::FindFullName("PluginMixedContentStatus");
525 prefs.block_mixed_plugin_content = 525 prefs.block_mixed_plugin_content =
526 plugin_mixed_content_status == "BlockableMixedContent"; 526 plugin_mixed_content_status == "BlockableMixedContent";
527 527
528 prefs.v8_cache_options = GetV8CacheOptions(); 528 prefs.v8_cache_options = GetV8CacheOptions();
529 529
530 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch(
531 switches::kDisableGestureRequirementForPresentation);
532
530 GetContentClient()->browser()->OverrideWebkitPrefs(this, &prefs); 533 GetContentClient()->browser()->OverrideWebkitPrefs(this, &prefs);
531 return prefs; 534 return prefs;
532 } 535 }
533 536
534 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 537 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
535 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 538 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
536 } 539 }
537 540
538 void RenderViewHostImpl::ClosePage() { 541 void RenderViewHostImpl::ClosePage() {
539 is_waiting_for_close_ack_ = true; 542 is_waiting_for_close_ack_ = true;
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1370
1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { 1371 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) {
1369 // The point in guest view is already converted. 1372 // The point in guest view is already converted.
1370 if (!render_widget_host_->scale_input_to_viewport()) 1373 if (!render_widget_host_->scale_input_to_viewport())
1371 return point; 1374 return point;
1372 float scale = GetWidget()->GetView()->current_device_scale_factor(); 1375 float scale = GetWidget()->GetView()->current_device_scale_factor();
1373 return gfx::Point(point.x() * scale, point.y() * scale); 1376 return gfx::Point(point.x() * scale, point.y() * scale);
1374 } 1377 }
1375 1378
1376 } // namespace content 1379 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698