| 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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 ui::WindowShowState* show_state) const { | 365 ui::WindowShowState* show_state) const { |
| 366 // The interface specifies returning restored bounds, not current bounds. | 366 // The interface specifies returning restored bounds, not current bounds. |
| 367 *bounds = GetRestoredBounds(); | 367 *bounds = GetRestoredBounds(); |
| 368 *show_state = window_ ? window_->GetProperty(aura::client::kShowStateKey) : | 368 *show_state = window_ ? window_->GetProperty(aura::client::kShowStateKey) : |
| 369 ui::SHOW_STATE_DEFAULT; | 369 ui::SHOW_STATE_DEFAULT; |
| 370 } | 370 } |
| 371 | 371 |
| 372 bool NativeWidgetAura::SetWindowTitle(const base::string16& title) { | 372 bool NativeWidgetAura::SetWindowTitle(const base::string16& title) { |
| 373 if (!window_) | 373 if (!window_) |
| 374 return false; | 374 return false; |
| 375 if (window_->title() == title) | 375 if (window_->GetTitle() == title) |
| 376 return false; | 376 return false; |
| 377 window_->SetTitle(title); | 377 window_->SetTitle(title); |
| 378 return true; | 378 return true; |
| 379 } | 379 } |
| 380 | 380 |
| 381 void NativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon, | 381 void NativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon, |
| 382 const gfx::ImageSkia& app_icon) { | 382 const gfx::ImageSkia& app_icon) { |
| 383 AssignIconToAuraWindow(window_, window_icon, app_icon); | 383 AssignIconToAuraWindow(window_, window_icon, app_icon); |
| 384 } | 384 } |
| 385 | 385 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 GetWidget()->widget_delegate()->CanMinimize()); | 767 GetWidget()->widget_delegate()->CanMinimize()); |
| 768 window_->SetProperty(aura::client::kCanResizeKey, | 768 window_->SetProperty(aura::client::kCanResizeKey, |
| 769 GetWidget()->widget_delegate()->CanResize()); | 769 GetWidget()->widget_delegate()->CanResize()); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void NativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { | 772 void NativeWidgetAura::RepostNativeEvent(gfx::NativeEvent native_event) { |
| 773 OnEvent(native_event); | 773 OnEvent(native_event); |
| 774 } | 774 } |
| 775 | 775 |
| 776 std::string NativeWidgetAura::GetName() const { | 776 std::string NativeWidgetAura::GetName() const { |
| 777 return window_ ? window_->name() : std::string(); | 777 return window_ ? window_->GetName() : std::string(); |
| 778 } | 778 } |
| 779 | 779 |
| 780 //////////////////////////////////////////////////////////////////////////////// | 780 //////////////////////////////////////////////////////////////////////////////// |
| 781 // NativeWidgetAura, aura::WindowDelegate implementation: | 781 // NativeWidgetAura, aura::WindowDelegate implementation: |
| 782 | 782 |
| 783 gfx::Size NativeWidgetAura::GetMinimumSize() const { | 783 gfx::Size NativeWidgetAura::GetMinimumSize() const { |
| 784 return delegate_->GetMinimumSize(); | 784 return delegate_->GetMinimumSize(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 gfx::Size NativeWidgetAura::GetMaximumSize() const { | 787 gfx::Size NativeWidgetAura::GetMaximumSize() const { |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 gfx::NativeView native_view) { | 1216 gfx::NativeView native_view) { |
| 1217 aura::client::CaptureClient* capture_client = | 1217 aura::client::CaptureClient* capture_client = |
| 1218 aura::client::GetCaptureClient(native_view->GetRootWindow()); | 1218 aura::client::GetCaptureClient(native_view->GetRootWindow()); |
| 1219 if (!capture_client) | 1219 if (!capture_client) |
| 1220 return nullptr; | 1220 return nullptr; |
| 1221 return capture_client->GetGlobalCaptureWindow(); | 1221 return capture_client->GetGlobalCaptureWindow(); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 } // namespace internal | 1224 } // namespace internal |
| 1225 } // namespace views | 1225 } // namespace views |
| OLD | NEW |