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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2640143002: Allow autoplay unmuted for WebAPK in the manifest scope (Closed)
Patch Set: addressed mlamouri's comments & cl format Created 3 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698