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/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_client.h" | 10 #include "ui/aura/client/activation_client.h" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 aura::RootWindow* root = window_->GetRootWindow(); | 527 aura::RootWindow* root = window_->GetRootWindow(); |
528 return root && | 528 return root && |
529 aura::client::GetActivationClient(root)->GetActiveWindow() == window_; | 529 aura::client::GetActivationClient(root)->GetActiveWindow() == window_; |
530 } | 530 } |
531 | 531 |
532 void NativeWidgetAura::SetAlwaysOnTop(bool on_top) { | 532 void NativeWidgetAura::SetAlwaysOnTop(bool on_top) { |
533 if (window_) | 533 if (window_) |
534 window_->SetProperty(aura::client::kAlwaysOnTopKey, on_top); | 534 window_->SetProperty(aura::client::kAlwaysOnTopKey, on_top); |
535 } | 535 } |
536 | 536 |
| 537 bool NativeWidgetAura::IsAlwaysOnTop() const { |
| 538 return window_ && window_->GetProperty(aura::client::kAlwaysOnTopKey); |
| 539 } |
| 540 |
537 void NativeWidgetAura::Maximize() { | 541 void NativeWidgetAura::Maximize() { |
538 if (window_) | 542 if (window_) |
539 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 543 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
540 } | 544 } |
541 | 545 |
542 void NativeWidgetAura::Minimize() { | 546 void NativeWidgetAura::Minimize() { |
543 if (window_) | 547 if (window_) |
544 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); | 548 window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
545 } | 549 } |
546 | 550 |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 return aura::Env::GetInstance()->is_mouse_button_down(); | 1148 return aura::Env::GetInstance()->is_mouse_button_down(); |
1145 } | 1149 } |
1146 | 1150 |
1147 // static | 1151 // static |
1148 bool NativeWidgetPrivate::IsTouchDown() { | 1152 bool NativeWidgetPrivate::IsTouchDown() { |
1149 return aura::Env::GetInstance()->is_touch_down(); | 1153 return aura::Env::GetInstance()->is_touch_down(); |
1150 } | 1154 } |
1151 | 1155 |
1152 } // namespace internal | 1156 } // namespace internal |
1153 } // namespace views | 1157 } // namespace views |
OLD | NEW |