| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 WebView::create(this, is_hidden() ? blink::WebPageVisibilityStateHidden | 619 WebView::create(this, is_hidden() ? blink::WebPageVisibilityStateHidden |
| 620 : blink::WebPageVisibilityStateVisible); | 620 : blink::WebPageVisibilityStateVisible); |
| 621 RenderWidget::Init(show_callback, webview_->widget()); | 621 RenderWidget::Init(show_callback, webview_->widget()); |
| 622 | 622 |
| 623 g_view_map.Get().insert(std::make_pair(webview(), this)); | 623 g_view_map.Get().insert(std::make_pair(webview(), this)); |
| 624 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this)); | 624 g_routing_id_view_map.Get().insert(std::make_pair(GetRoutingID(), this)); |
| 625 | 625 |
| 626 const base::CommandLine& command_line = | 626 const base::CommandLine& command_line = |
| 627 *base::CommandLine::ForCurrentProcess(); | 627 *base::CommandLine::ForCurrentProcess(); |
| 628 | 628 |
| 629 if (command_line.HasSwitch(switches::kMediaPlaybackGestureWhitelistScope)) { |
| 630 webview()->settings()->setMediaPlaybackGestureWhitelistScope( |
| 631 blink::WebString::fromASCII(command_line.GetSwitchValueASCII( |
| 632 switches::kMediaPlaybackGestureWhitelistScope))); |
| 633 } |
| 634 |
| 629 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 635 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
| 630 stats_collection_observer_.reset(new StatsCollectionObserver(this)); | 636 stats_collection_observer_.reset(new StatsCollectionObserver(this)); |
| 631 | 637 |
| 632 // Debug cases of https://crbug.com/575245. | 638 // Debug cases of https://crbug.com/575245. |
| 633 base::debug::SetCrashKeyValue("rvinit_view_id", | 639 base::debug::SetCrashKeyValue("rvinit_view_id", |
| 634 base::IntToString(GetRoutingID())); | 640 base::IntToString(GetRoutingID())); |
| 635 base::debug::SetCrashKeyValue("rvinit_proxy_id", | 641 base::debug::SetCrashKeyValue("rvinit_proxy_id", |
| 636 base::IntToString(params.proxy_routing_id)); | 642 base::IntToString(params.proxy_routing_id)); |
| 637 base::debug::SetCrashKeyValue( | 643 base::debug::SetCrashKeyValue( |
| 638 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); | 644 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id)); |
| (...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2717 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2723 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2718 } | 2724 } |
| 2719 | 2725 |
| 2720 std::unique_ptr<InputEventAck> ack( | 2726 std::unique_ptr<InputEventAck> ack( |
| 2721 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2727 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
| 2722 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2728 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2723 OnInputEventAck(std::move(ack)); | 2729 OnInputEventAck(std::move(ack)); |
| 2724 } | 2730 } |
| 2725 | 2731 |
| 2726 } // namespace content | 2732 } // namespace content |
| OLD | NEW |