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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1379 int32_t view_routing_id = params.routing_id; | 1379 int32_t view_routing_id = params.routing_id; |
1380 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; | 1380 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; |
1381 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { | 1381 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { |
1382 view_routing_id = main_frame_widget_routing_id = | 1382 view_routing_id = main_frame_widget_routing_id = |
1383 site_instance->GetProcess()->GetNextRoutingID(); | 1383 site_instance->GetProcess()->GetNextRoutingID(); |
1384 } | 1384 } |
1385 | 1385 |
1386 GetRenderManager()->Init(site_instance.get(), view_routing_id, | 1386 GetRenderManager()->Init(site_instance.get(), view_routing_id, |
1387 params.main_frame_routing_id, | 1387 params.main_frame_routing_id, |
1388 main_frame_widget_routing_id); | 1388 main_frame_widget_routing_id); |
1389 frame_tree_.root()->SetFrameName(params.main_frame_name); | 1389 // TODO(lukasza): Avoid having to duplicate how blink::FrameTree::setName |
1390 // calculates |unique_name| for the main frame. | |
Charlie Reis
2016/01/27 23:48:49
I don't understand this TODO or how it relates to
Łukasz Anforowicz
2016/01/28 01:21:19
Both 1) the code below and 2) the code in FrameTre
Charlie Reis
2016/02/11 22:02:13
Oh, I see. The only calculation here is an assign
| |
1391 std::string unique_name = params.main_frame_name; | |
1392 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); | |
1390 | 1393 |
1391 WebContentsViewDelegate* delegate = | 1394 WebContentsViewDelegate* delegate = |
1392 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1395 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
1393 | 1396 |
1394 #if defined(MOJO_SHELL_CLIENT) | 1397 #if defined(MOJO_SHELL_CLIENT) |
1395 if (MojoShellConnection::Get() && | 1398 if (MojoShellConnection::Get() && |
1396 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1399 base::CommandLine::ForCurrentProcess()->HasSwitch( |
1397 switches::kUseMusInRenderer)) { | 1400 switches::kUseMusInRenderer)) { |
1398 mus::Window* mus_window = aura::GetMusWindow(params.context); | 1401 mus::Window* mus_window = aura::GetMusWindow(params.context); |
1399 if (mus_window) { | 1402 if (mus_window) { |
(...skipping 3346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4746 const WebContentsObserver::MediaPlayerId& id) { | 4749 const WebContentsObserver::MediaPlayerId& id) { |
4747 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4750 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4748 } | 4751 } |
4749 | 4752 |
4750 void WebContentsImpl::MediaStoppedPlaying( | 4753 void WebContentsImpl::MediaStoppedPlaying( |
4751 const WebContentsObserver::MediaPlayerId& id) { | 4754 const WebContentsObserver::MediaPlayerId& id) { |
4752 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4755 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4753 } | 4756 } |
4754 | 4757 |
4755 } // namespace content | 4758 } // namespace content |
OLD | NEW |