| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/widget/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 return content_window_ ? | 678 return content_window_ ? |
| 679 desktop_window_tree_host_->GetWorkspace() : std::string(); | 679 desktop_window_tree_host_->GetWorkspace() : std::string(); |
| 680 } | 680 } |
| 681 | 681 |
| 682 void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) { | 682 void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) { |
| 683 if (!content_window_) | 683 if (!content_window_) |
| 684 return; | 684 return; |
| 685 aura::Window* root = host_->window(); | 685 aura::Window* root = host_->window(); |
| 686 display::Screen* screen = display::Screen::GetScreen(); | 686 display::Screen* screen = display::Screen::GetScreen(); |
| 687 gfx::Rect bounds_in_pixels = screen->DIPToScreenRectInWindow(root, bounds); | 687 gfx::Rect bounds_in_pixels = screen->DIPToScreenRectInWindow(root, bounds); |
| 688 desktop_window_tree_host_->AsWindowTreeHost()->SetBounds(bounds_in_pixels); | 688 desktop_window_tree_host_->AsWindowTreeHost()->SetBoundsInPixels( |
| 689 bounds_in_pixels); |
| 689 } | 690 } |
| 690 | 691 |
| 691 void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) { | 692 void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) { |
| 692 if (content_window_) | 693 if (content_window_) |
| 693 desktop_window_tree_host_->SetSize(size); | 694 desktop_window_tree_host_->SetSize(size); |
| 694 } | 695 } |
| 695 | 696 |
| 696 void DesktopNativeWidgetAura::StackAbove(gfx::NativeView native_view) { | 697 void DesktopNativeWidgetAura::StackAbove(gfx::NativeView native_view) { |
| 697 if (content_window_) | 698 if (content_window_) |
| 698 desktop_window_tree_host_->StackAbove(native_view); | 699 desktop_window_tree_host_->StackAbove(native_view); |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 if (cursor_reference_count_ == 0) { | 1198 if (cursor_reference_count_ == 0) { |
| 1198 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1199 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1199 // for cleaning up |cursor_manager_|. | 1200 // for cleaning up |cursor_manager_|. |
| 1200 delete cursor_manager_; | 1201 delete cursor_manager_; |
| 1201 native_cursor_manager_ = NULL; | 1202 native_cursor_manager_ = NULL; |
| 1202 cursor_manager_ = NULL; | 1203 cursor_manager_ = NULL; |
| 1203 } | 1204 } |
| 1204 } | 1205 } |
| 1205 | 1206 |
| 1206 } // namespace views | 1207 } // namespace views |
| OLD | NEW |