OLD | NEW |
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 Loading... |
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); |
530 GetContentClient()->browser()->OverrideWebkitPrefs(this, &prefs); | 532 GetContentClient()->browser()->OverrideWebkitPrefs(this, &prefs); |
531 return prefs; | 533 return prefs; |
532 } | 534 } |
533 | 535 |
534 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { | 536 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { |
535 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); | 537 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); |
536 } | 538 } |
537 | 539 |
538 void RenderViewHostImpl::ClosePage() { | 540 void RenderViewHostImpl::ClosePage() { |
539 is_waiting_for_close_ack_ = true; | 541 is_waiting_for_close_ack_ = true; |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 | 1369 |
1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { | 1370 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { |
1369 // The point in guest view is already converted. | 1371 // The point in guest view is already converted. |
1370 if (!render_widget_host_->scale_input_to_viewport()) | 1372 if (!render_widget_host_->scale_input_to_viewport()) |
1371 return point; | 1373 return point; |
1372 float scale = GetWidget()->GetView()->current_device_scale_factor(); | 1374 float scale = GetWidget()->GetView()->current_device_scale_factor(); |
1373 return gfx::Point(point.x() * scale, point.y() * scale); | 1375 return gfx::Point(point.x() * scale, point.y() * scale); |
1374 } | 1376 } |
1375 | 1377 |
1376 } // namespace content | 1378 } // namespace content |
OLD | NEW |