OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura/desktop.h" | 5 #include "ui/aura/desktop.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 #endif | 177 #endif |
178 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(), | 178 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(), |
179 host_->GetSize()); | 179 host_->GetSize()); |
180 } | 180 } |
181 DCHECK(compositor_.get()); | 181 DCHECK(compositor_.get()); |
182 } | 182 } |
183 | 183 |
184 Desktop::~Desktop() { | 184 Desktop::~Desktop() { |
185 in_destructor_ = true; | 185 in_destructor_ = true; |
186 #ifdef USE_WEBKIT_COMPOSITOR | 186 #ifdef USE_WEBKIT_COMPOSITOR |
187 if (!compositor_factory_) | 187 if (!ui::Compositor::compositor_factory()) |
188 ui::CompositorCC::Terminate(); | 188 ui::CompositorCC::Terminate(); |
189 #endif | 189 #endif |
190 if (instance_ == this) | 190 if (instance_ == this) |
191 instance_ = NULL; | 191 instance_ = NULL; |
192 } | 192 } |
193 | 193 |
194 // static | 194 // static |
195 Desktop* Desktop::GetInstance() { | 195 Desktop* Desktop::GetInstance() { |
196 if (!instance_) { | 196 if (!instance_) { |
197 instance_ = new Desktop; | 197 instance_ = new Desktop; |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { | 625 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { |
626 bounds.set_size(gfx::Size(parsed_width, parsed_height)); | 626 bounds.set_size(gfx::Size(parsed_width, parsed_height)); |
627 } else if (use_fullscreen_host_window_) { | 627 } else if (use_fullscreen_host_window_) { |
628 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); | 628 bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize()); |
629 } | 629 } |
630 | 630 |
631 return bounds; | 631 return bounds; |
632 } | 632 } |
633 | 633 |
634 } // namespace aura | 634 } // namespace aura |
OLD | NEW |