| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 if (window_ && window_->parent() && | 458 if (window_ && window_->parent() && |
| 459 window_->parent() == native_view->parent()) | 459 window_->parent() == native_view->parent()) |
| 460 window_->parent()->StackChildAbove(window_, native_view); | 460 window_->parent()->StackChildAbove(window_, native_view); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void NativeWidgetAura::StackAtTop() { | 463 void NativeWidgetAura::StackAtTop() { |
| 464 if (window_) | 464 if (window_) |
| 465 window_->parent()->StackChildAtTop(window_); | 465 window_->parent()->StackChildAtTop(window_); |
| 466 } | 466 } |
| 467 | 467 |
| 468 void NativeWidgetAura::StackBelow(gfx::NativeView native_view) { | |
| 469 if (window_ && window_->parent() && | |
| 470 window_->parent() == native_view->parent()) | |
| 471 window_->parent()->StackChildBelow(window_, native_view); | |
| 472 } | |
| 473 | |
| 474 void NativeWidgetAura::SetShape(std::unique_ptr<SkRegion> region) { | 468 void NativeWidgetAura::SetShape(std::unique_ptr<SkRegion> region) { |
| 475 if (window_) | 469 if (window_) |
| 476 window_->layer()->SetAlphaShape(std::move(region)); | 470 window_->layer()->SetAlphaShape(std::move(region)); |
| 477 } | 471 } |
| 478 | 472 |
| 479 void NativeWidgetAura::Close() { | 473 void NativeWidgetAura::Close() { |
| 480 // |window_| may already be deleted by parent window. This can happen | 474 // |window_| may already be deleted by parent window. This can happen |
| 481 // when this widget is child widget or has transient parent | 475 // when this widget is child widget or has transient parent |
| 482 // and ownership is WIDGET_OWNS_NATIVE_WIDGET. | 476 // and ownership is WIDGET_OWNS_NATIVE_WIDGET. |
| 483 DCHECK(window_ || | 477 DCHECK(window_ || |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 gfx::NativeView native_view) { | 1215 gfx::NativeView native_view) { |
| 1222 aura::client::CaptureClient* capture_client = | 1216 aura::client::CaptureClient* capture_client = |
| 1223 aura::client::GetCaptureClient(native_view->GetRootWindow()); | 1217 aura::client::GetCaptureClient(native_view->GetRootWindow()); |
| 1224 if (!capture_client) | 1218 if (!capture_client) |
| 1225 return nullptr; | 1219 return nullptr; |
| 1226 return capture_client->GetGlobalCaptureWindow(); | 1220 return capture_client->GetGlobalCaptureWindow(); |
| 1227 } | 1221 } |
| 1228 | 1222 |
| 1229 } // namespace internal | 1223 } // namespace internal |
| 1230 } // namespace views | 1224 } // namespace views |
| OLD | NEW |