| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_window.h" | 5 #include "chromecast/browser/cast_content_window.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "chromecast/base/metrics/cast_metrics_helper.h" | 10 #include "chromecast/base/metrics/cast_metrics_helper.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #endif | 68 #endif |
| 69 } | 69 } |
| 70 | 70 |
| 71 void CastContentWindow::CreateWindowTree( | 71 void CastContentWindow::CreateWindowTree( |
| 72 const gfx::Size& initial_size, | 72 const gfx::Size& initial_size, |
| 73 content::WebContents* web_contents) { | 73 content::WebContents* web_contents) { |
| 74 #if defined(USE_AURA) | 74 #if defined(USE_AURA) |
| 75 // Aura initialization | 75 // Aura initialization |
| 76 CastScreen* cast_screen = | 76 CastScreen* cast_screen = |
| 77 shell::CastBrowserProcess::GetInstance()->cast_screen(); | 77 shell::CastBrowserProcess::GetInstance()->cast_screen(); |
| 78 if (!gfx::Screen::GetScreen()) | 78 if (!display::Screen::GetScreen()) |
| 79 gfx::Screen::SetScreenInstance(cast_screen); | 79 display::Screen::SetScreenInstance(cast_screen); |
| 80 if (cast_screen->GetPrimaryDisplay().size() != initial_size) | 80 if (cast_screen->GetPrimaryDisplay().size() != initial_size) |
| 81 cast_screen->UpdateDisplaySize(initial_size); | 81 cast_screen->UpdateDisplaySize(initial_size); |
| 82 | 82 |
| 83 CHECK(aura::Env::GetInstance()); | 83 CHECK(aura::Env::GetInstance()); |
| 84 window_tree_host_.reset( | 84 window_tree_host_.reset( |
| 85 aura::WindowTreeHost::Create(gfx::Rect(initial_size))); | 85 aura::WindowTreeHost::Create(gfx::Rect(initial_size))); |
| 86 window_tree_host_->InitHost(); | 86 window_tree_host_->InitHost(); |
| 87 window_tree_host_->window()->SetLayoutManager( | 87 window_tree_host_->window()->SetLayoutManager( |
| 88 new CastFillLayout(window_tree_host_->window())); | 88 new CastFillLayout(window_tree_host_->window())); |
| 89 | 89 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 content::RenderViewHost* render_view_host) { | 133 content::RenderViewHost* render_view_host) { |
| 134 content::RenderWidgetHostView* view = | 134 content::RenderWidgetHostView* view = |
| 135 render_view_host->GetWidget()->GetView(); | 135 render_view_host->GetWidget()->GetView(); |
| 136 if (view) | 136 if (view) |
| 137 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT | 137 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT |
| 138 : SK_ColorBLACK); | 138 : SK_ColorBLACK); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace shell | 141 } // namespace shell |
| 142 } // namespace chromecast | 142 } // namespace chromecast |
| OLD | NEW |