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 "ash/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 #include "ui/views/corewm/corewm_switches.h" | 93 #include "ui/views/corewm/corewm_switches.h" |
94 #include "ui/views/corewm/focus_controller.h" | 94 #include "ui/views/corewm/focus_controller.h" |
95 #include "ui/views/corewm/input_method_event_filter.h" | 95 #include "ui/views/corewm/input_method_event_filter.h" |
96 #include "ui/views/corewm/shadow_controller.h" | 96 #include "ui/views/corewm/shadow_controller.h" |
97 #include "ui/views/corewm/tooltip_controller.h" | 97 #include "ui/views/corewm/tooltip_controller.h" |
98 #include "ui/views/corewm/visibility_controller.h" | 98 #include "ui/views/corewm/visibility_controller.h" |
99 #include "ui/views/corewm/window_modality_controller.h" | 99 #include "ui/views/corewm/window_modality_controller.h" |
100 #include "ui/views/focus/focus_manager_factory.h" | 100 #include "ui/views/focus/focus_manager_factory.h" |
101 #include "ui/views/widget/native_widget_aura.h" | 101 #include "ui/views/widget/native_widget_aura.h" |
102 #include "ui/views/widget/widget.h" | 102 #include "ui/views/widget/widget.h" |
103 #include "ui/views/window/dialog_delegate.h" | |
104 | 103 |
105 #if !defined(OS_MACOSX) | 104 #if !defined(OS_MACOSX) |
106 #include "ash/accelerators/accelerator_controller.h" | 105 #include "ash/accelerators/accelerator_controller.h" |
107 #include "ash/accelerators/accelerator_filter.h" | 106 #include "ash/accelerators/accelerator_filter.h" |
108 #include "ash/accelerators/nested_dispatcher_controller.h" | 107 #include "ash/accelerators/nested_dispatcher_controller.h" |
109 #endif | 108 #endif |
110 | 109 |
111 #if defined(OS_CHROMEOS) && defined(USE_X11) | 110 #if defined(OS_CHROMEOS) && defined(USE_X11) |
112 #include "ash/ash_constants.h" | 111 #include "ash/ash_constants.h" |
113 #include "ash/display/display_change_observer_x11.h" | 112 #include "ash/display/display_change_observer_x11.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 ui::MODAL_TYPE_SYSTEM && (*wit)->TargetVisibility()) { | 680 ui::MODAL_TYPE_SYSTEM && (*wit)->TargetVisibility()) { |
682 return true; | 681 return true; |
683 } | 682 } |
684 } | 683 } |
685 } | 684 } |
686 return false; | 685 return false; |
687 } | 686 } |
688 | 687 |
689 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( | 688 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( |
690 views::Widget* widget) { | 689 views::Widget* widget) { |
691 if (views::DialogDelegate::UseNewStyle()) | |
692 return views::DialogDelegate::CreateNewStyleFrameView(widget); | |
693 // Use translucent-style window frames for dialogs. | 690 // Use translucent-style window frames for dialogs. |
694 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; | 691 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; |
695 frame_view->Init(widget); | 692 frame_view->Init(widget); |
696 return frame_view; | 693 return frame_view; |
697 } | 694 } |
698 | 695 |
699 void Shell::RotateFocus(Direction direction) { | 696 void Shell::RotateFocus(Direction direction) { |
700 focus_cycler_->RotateFocus( | 697 focus_cycler_->RotateFocus( |
701 direction == FORWARD ? internal::FocusCycler::FORWARD : | 698 direction == FORWARD ? internal::FocusCycler::FORWARD : |
702 internal::FocusCycler::BACKWARD); | 699 internal::FocusCycler::BACKWARD); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 //////////////////////////////////////////////////////////////////////////////// | 952 //////////////////////////////////////////////////////////////////////////////// |
956 // Shell, aura::client::ActivationChangeObserver implementation: | 953 // Shell, aura::client::ActivationChangeObserver implementation: |
957 | 954 |
958 void Shell::OnWindowActivated(aura::Window* gained_active, | 955 void Shell::OnWindowActivated(aura::Window* gained_active, |
959 aura::Window* lost_active) { | 956 aura::Window* lost_active) { |
960 if (gained_active) | 957 if (gained_active) |
961 active_root_window_ = gained_active->GetRootWindow(); | 958 active_root_window_ = gained_active->GetRootWindow(); |
962 } | 959 } |
963 | 960 |
964 } // namespace ash | 961 } // namespace ash |
OLD | NEW |