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/threading/thread_restrictions.h" | 7 #include "base/threading/thread_restrictions.h" |
8 #include "chromecast/base/metrics/cast_metrics_helper.h" | 8 #include "chromecast/base/metrics/cast_metrics_helper.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (old_screen) { | 78 if (old_screen) { |
79 delete old_screen; | 79 delete old_screen; |
80 } | 80 } |
81 } | 81 } |
82 CHECK(aura::Env::GetInstance()); | 82 CHECK(aura::Env::GetInstance()); |
83 window_tree_host_.reset( | 83 window_tree_host_.reset( |
84 aura::WindowTreeHost::Create(gfx::Rect(initial_size))); | 84 aura::WindowTreeHost::Create(gfx::Rect(initial_size))); |
85 window_tree_host_->InitHost(); | 85 window_tree_host_->InitHost(); |
86 window_tree_host_->window()->SetLayoutManager( | 86 window_tree_host_->window()->SetLayoutManager( |
87 new CastFillLayout(window_tree_host_->window())); | 87 new CastFillLayout(window_tree_host_->window())); |
| 88 window_tree_host_->compositor()->SetBackgroundColor(SK_ColorBLACK); |
88 | 89 |
89 focus_client_.reset(new aura::test::TestFocusClient()); | 90 focus_client_.reset(new aura::test::TestFocusClient()); |
90 aura::client::SetFocusClient( | 91 aura::client::SetFocusClient( |
91 window_tree_host_->window(), focus_client_.get()); | 92 window_tree_host_->window(), focus_client_.get()); |
92 | 93 |
93 window_tree_host_->Show(); | 94 window_tree_host_->Show(); |
94 | 95 |
95 // Add and show content's view/window | 96 // Add and show content's view/window |
96 aura::Window* content_window = web_contents->GetNativeView(); | 97 aura::Window* content_window = web_contents->GetNativeView(); |
97 aura::Window* parent = window_tree_host_->window(); | 98 aura::Window* parent = window_tree_host_->window(); |
(...skipping 14 matching lines...) Expand all Loading... |
112 create_params); | 113 create_params); |
113 content::WebContentsObserver::Observe(web_contents); | 114 content::WebContentsObserver::Observe(web_contents); |
114 return make_scoped_ptr(web_contents); | 115 return make_scoped_ptr(web_contents); |
115 } | 116 } |
116 | 117 |
117 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { | 118 void CastContentWindow::DidFirstVisuallyNonEmptyPaint() { |
118 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); | 119 metrics::CastMetricsHelper::GetInstance()->LogTimeToFirstPaint(); |
119 } | 120 } |
120 | 121 |
121 } // namespace chromecast | 122 } // namespace chromecast |
OLD | NEW |