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

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

Issue 2567293004: Makes WindowTreeHost::InitHost() not Show the window (Closed)
Patch Set: WTF::Show shows window Created 4 years 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/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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void CastContentWindow::CreateWindowTree(content::WebContents* web_contents) { 75 void CastContentWindow::CreateWindowTree(content::WebContents* web_contents) {
76 #if defined(USE_AURA) 76 #if defined(USE_AURA)
77 // Aura initialization 77 // Aura initialization
78 DCHECK(display::Screen::GetScreen()); 78 DCHECK(display::Screen::GetScreen());
79 gfx::Size display_size = 79 gfx::Size display_size =
80 display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel(); 80 display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel();
81 CHECK(aura::Env::GetInstance()); 81 CHECK(aura::Env::GetInstance());
82 window_tree_host_.reset( 82 window_tree_host_.reset(
83 aura::WindowTreeHost::Create(gfx::Rect(display_size))); 83 aura::WindowTreeHost::Create(gfx::Rect(display_size)));
84 window_tree_host_->InitHost(); 84 window_tree_host_->InitHost();
85 window_tree_host_->window()->Show();
85 window_tree_host_->window()->SetLayoutManager( 86 window_tree_host_->window()->SetLayoutManager(
86 new CastFillLayout(window_tree_host_->window())); 87 new CastFillLayout(window_tree_host_->window()));
87 88
88 if (transparent_) { 89 if (transparent_) {
89 window_tree_host_->compositor()->SetBackgroundColor(SK_ColorTRANSPARENT); 90 window_tree_host_->compositor()->SetBackgroundColor(SK_ColorTRANSPARENT);
90 window_tree_host_->compositor()->SetHostHasTransparentBackground(true); 91 window_tree_host_->compositor()->SetHostHasTransparentBackground(true);
91 } else { 92 } else {
92 window_tree_host_->compositor()->SetBackgroundColor(SK_ColorBLACK); 93 window_tree_host_->compositor()->SetBackgroundColor(SK_ColorBLACK);
93 } 94 }
94 95
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 157
157 void CastContentWindow::OnVSyncIntervalChanged(base::TimeDelta interval) { 158 void CastContentWindow::OnVSyncIntervalChanged(base::TimeDelta interval) {
158 #if defined(USE_AURA) 159 #if defined(USE_AURA)
159 window_tree_host_->compositor()->SetAuthoritativeVSyncInterval( 160 window_tree_host_->compositor()->SetAuthoritativeVSyncInterval(
160 interval); 161 interval);
161 #endif 162 #endif
162 } 163 }
163 164
164 } // namespace shell 165 } // namespace shell
165 } // namespace chromecast 166 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698