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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 } | 672 } |
673 } | 673 } |
674 | 674 |
675 void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) { | 675 void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) { |
676 if (window_) | 676 if (window_) |
677 window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); | 677 window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); |
678 } | 678 } |
679 | 679 |
680 ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const { | 680 ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const { |
681 #if !defined(OS_CHROMEOS) | 681 #if !defined(OS_CHROMEOS) |
682 return DesktopRootWindowHost::GetNativeTheme(window_); | 682 return DesktopWindowTreeHost::GetNativeTheme(window_); |
683 #else | 683 #else |
684 return ui::NativeThemeAura::instance(); | 684 return ui::NativeThemeAura::instance(); |
685 #endif | 685 #endif |
686 } | 686 } |
687 | 687 |
688 void NativeWidgetAura::OnRootViewLayout() const { | 688 void NativeWidgetAura::OnRootViewLayout() const { |
689 } | 689 } |
690 | 690 |
691 //////////////////////////////////////////////////////////////////////////////// | 691 //////////////////////////////////////////////////////////////////////////////// |
692 // NativeWidgetAura, views::InputMethodDelegate implementation: | 692 // NativeWidgetAura, views::InputMethodDelegate implementation: |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 // widgets it seems relatively safe to skip the extra processing of | 983 // widgets it seems relatively safe to skip the extra processing of |
984 // Close. | 984 // Close. |
985 widget->CloseNow(); | 985 widget->CloseNow(); |
986 } | 986 } |
987 } | 987 } |
988 #endif | 988 #endif |
989 | 989 |
990 #if defined(OS_WIN) | 990 #if defined(OS_WIN) |
991 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) { | 991 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) { |
992 aura::Window* root_window = | 992 aura::Window* root_window = |
993 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd); | 993 DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd); |
994 CloseWindow(root_window); | 994 CloseWindow(root_window); |
995 return TRUE; | 995 return TRUE; |
996 } | 996 } |
997 #endif | 997 #endif |
998 } // namespace | 998 } // namespace |
999 | 999 |
1000 // static | 1000 // static |
1001 void Widget::CloseAllSecondaryWidgets() { | 1001 void Widget::CloseAllSecondaryWidgets() { |
1002 #if defined(OS_WIN) | 1002 #if defined(OS_WIN) |
1003 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 1003 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
1004 #endif | 1004 #endif |
1005 | 1005 |
1006 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 1006 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
1007 std::vector<aura::Window*> open_windows = | 1007 std::vector<aura::Window*> open_windows = |
1008 DesktopRootWindowHostX11::GetAllOpenWindows(); | 1008 DesktopWindowTreeHostX11::GetAllOpenWindows(); |
1009 std::for_each(open_windows.begin(), open_windows.end(), CloseWindow); | 1009 std::for_each(open_windows.begin(), open_windows.end(), CloseWindow); |
1010 DesktopRootWindowHostX11::CleanUpWindowList(); | 1010 DesktopWindowTreeHostX11::CleanUpWindowList(); |
1011 #endif | 1011 #endif |
1012 } | 1012 } |
1013 | 1013 |
1014 bool Widget::ConvertRect(const Widget* source, | 1014 bool Widget::ConvertRect(const Widget* source, |
1015 const Widget* target, | 1015 const Widget* target, |
1016 gfx::Rect* rect) { | 1016 gfx::Rect* rect) { |
1017 return false; | 1017 return false; |
1018 } | 1018 } |
1019 | 1019 |
1020 namespace internal { | 1020 namespace internal { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 return aura::Env::GetInstance()->IsMouseButtonDown(); | 1139 return aura::Env::GetInstance()->IsMouseButtonDown(); |
1140 } | 1140 } |
1141 | 1141 |
1142 // static | 1142 // static |
1143 bool NativeWidgetPrivate::IsTouchDown() { | 1143 bool NativeWidgetPrivate::IsTouchDown() { |
1144 return aura::Env::GetInstance()->is_touch_down(); | 1144 return aura::Env::GetInstance()->is_touch_down(); |
1145 } | 1145 } |
1146 | 1146 |
1147 } // namespace internal | 1147 } // namespace internal |
1148 } // namespace views | 1148 } // namespace views |
OLD | NEW |