Chromium Code Reviews| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 if (!window_) | 348 if (!window_) |
| 349 return false; | 349 return false; |
| 350 if (window_->title() == title) | 350 if (window_->title() == title) |
| 351 return false; | 351 return false; |
| 352 window_->SetTitle(title); | 352 window_->SetTitle(title); |
| 353 return true; | 353 return true; |
| 354 } | 354 } |
| 355 | 355 |
| 356 void NativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon, | 356 void NativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon, |
| 357 const gfx::ImageSkia& app_icon) { | 357 const gfx::ImageSkia& app_icon) { |
| 358 // Aura doesn't have window icons. | 358 if (window_) { |
| 359 window_->SetProperty( | |
|
sky
2016/08/09 21:24:27
How about making this function public static in Na
qiangchen
2016/08/09 22:07:35
Done.
| |
| 360 aura::client::kWindowIconKey, | |
| 361 new gfx::ImageSkia(!window_icon.isNull() ? window_icon : app_icon)); | |
| 362 } | |
| 359 } | 363 } |
| 360 | 364 |
| 361 void NativeWidgetAura::InitModalType(ui::ModalType modal_type) { | 365 void NativeWidgetAura::InitModalType(ui::ModalType modal_type) { |
| 362 if (modal_type != ui::MODAL_TYPE_NONE) | 366 if (modal_type != ui::MODAL_TYPE_NONE) |
| 363 window_->SetProperty(aura::client::kModalKey, modal_type); | 367 window_->SetProperty(aura::client::kModalKey, modal_type); |
| 364 } | 368 } |
| 365 | 369 |
| 366 gfx::Rect NativeWidgetAura::GetWindowBoundsInScreen() const { | 370 gfx::Rect NativeWidgetAura::GetWindowBoundsInScreen() const { |
| 367 return window_ ? window_->GetBoundsInScreen() : gfx::Rect(); | 371 return window_ ? window_->GetBoundsInScreen() : gfx::Rect(); |
| 368 } | 372 } |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1196 gfx::NativeView native_view) { | 1200 gfx::NativeView native_view) { |
| 1197 aura::client::CaptureClient* capture_client = | 1201 aura::client::CaptureClient* capture_client = |
| 1198 aura::client::GetCaptureClient(native_view->GetRootWindow()); | 1202 aura::client::GetCaptureClient(native_view->GetRootWindow()); |
| 1199 if (!capture_client) | 1203 if (!capture_client) |
| 1200 return nullptr; | 1204 return nullptr; |
| 1201 return capture_client->GetGlobalCaptureWindow(); | 1205 return capture_client->GetGlobalCaptureWindow(); |
| 1202 } | 1206 } |
| 1203 | 1207 |
| 1204 } // namespace internal | 1208 } // namespace internal |
| 1205 } // namespace views | 1209 } // namespace views |
| OLD | NEW |