| 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 int32_t view_routing_id = params.routing_id; | 1359 int32_t view_routing_id = params.routing_id; |
| 1360 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; | 1360 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; |
| 1361 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { | 1361 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { |
| 1362 view_routing_id = main_frame_widget_routing_id = | 1362 view_routing_id = main_frame_widget_routing_id = |
| 1363 site_instance->GetProcess()->GetNextRoutingID(); | 1363 site_instance->GetProcess()->GetNextRoutingID(); |
| 1364 } | 1364 } |
| 1365 | 1365 |
| 1366 GetRenderManager()->Init(site_instance.get(), view_routing_id, | 1366 GetRenderManager()->Init(site_instance.get(), view_routing_id, |
| 1367 params.main_frame_routing_id, | 1367 params.main_frame_routing_id, |
| 1368 main_frame_widget_routing_id); | 1368 main_frame_widget_routing_id); |
| 1369 frame_tree_.root()->SetFrameName(params.main_frame_name); | 1369 |
| 1370 // blink::FrameTree::setName uses |name| as the |unique_name| for the main |
| 1371 // frame - let's do the same thing here. |
| 1372 std::string unique_name = params.main_frame_name; |
| 1373 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); |
| 1370 | 1374 |
| 1371 WebContentsViewDelegate* delegate = | 1375 WebContentsViewDelegate* delegate = |
| 1372 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1376 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
| 1373 | 1377 |
| 1374 #if defined(MOJO_SHELL_CLIENT) | 1378 #if defined(MOJO_SHELL_CLIENT) |
| 1375 if (MojoShellConnection::Get() && | 1379 if (MojoShellConnection::Get() && |
| 1376 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1380 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1377 switches::kUseMusInRenderer)) { | 1381 switches::kUseMusInRenderer)) { |
| 1378 mus::Window* mus_window = aura::GetMusWindow(params.context); | 1382 mus::Window* mus_window = aura::GetMusWindow(params.context); |
| 1379 if (mus_window) { | 1383 if (mus_window) { |
| (...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4761 const WebContentsObserver::MediaPlayerId& id) { | 4765 const WebContentsObserver::MediaPlayerId& id) { |
| 4762 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4766 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4763 } | 4767 } |
| 4764 | 4768 |
| 4765 void WebContentsImpl::MediaStoppedPlaying( | 4769 void WebContentsImpl::MediaStoppedPlaying( |
| 4766 const WebContentsObserver::MediaPlayerId& id) { | 4770 const WebContentsObserver::MediaPlayerId& id) { |
| 4767 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4771 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4768 } | 4772 } |
| 4769 | 4773 |
| 4770 } // namespace content | 4774 } // namespace content |
| OLD | NEW |