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

Side by Side Diff: chromecast/browser/cast_content_window.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 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/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "chromecast/base/metrics/cast_metrics_helper.h" 9 #include "chromecast/base/metrics/cast_metrics_helper.h"
10 #include "chromecast/browser/cast_browser_process.h" 10 #include "chromecast/browser/cast_browser_process.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) 78 if (!gfx::Screen::GetScreen())
79 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, cast_screen); 79 gfx::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 media::VideoPlaneController::GetInstance()->SetGraphicsPlaneResolution( 82 media::VideoPlaneController::GetInstance()->SetGraphicsPlaneResolution(
83 Size(initial_size.width(), initial_size.height())); 83 Size(initial_size.width(), initial_size.height()));
84 84
85 CHECK(aura::Env::GetInstance()); 85 CHECK(aura::Env::GetInstance());
86 window_tree_host_.reset( 86 window_tree_host_.reset(
87 aura::WindowTreeHost::Create(gfx::Rect(initial_size))); 87 aura::WindowTreeHost::Create(gfx::Rect(initial_size)));
88 window_tree_host_->InitHost(); 88 window_tree_host_->InitHost();
89 window_tree_host_->window()->SetLayoutManager( 89 window_tree_host_->window()->SetLayoutManager(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 content::RenderViewHost* render_view_host) { 135 content::RenderViewHost* render_view_host) {
136 content::RenderWidgetHostView* view = 136 content::RenderWidgetHostView* view =
137 render_view_host->GetWidget()->GetView(); 137 render_view_host->GetWidget()->GetView();
138 if (view) 138 if (view)
139 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT 139 view->SetBackgroundColor(transparent_ ? SK_ColorTRANSPARENT
140 : SK_ColorBLACK); 140 : SK_ColorBLACK);
141 } 141 }
142 142
143 } // namespace shell 143 } // namespace shell
144 } // namespace chromecast 144 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_browser_main_parts.cc ('k') | components/autofill/content/browser/risk/fingerprint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698