| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "ui/views/corewm/compound_event_filter.h" | 87 #include "ui/views/corewm/compound_event_filter.h" |
| 88 #include "ui/views/corewm/corewm_switches.h" | 88 #include "ui/views/corewm/corewm_switches.h" |
| 89 #include "ui/views/corewm/focus_controller.h" | 89 #include "ui/views/corewm/focus_controller.h" |
| 90 #include "ui/views/corewm/input_method_event_filter.h" | 90 #include "ui/views/corewm/input_method_event_filter.h" |
| 91 #include "ui/views/corewm/shadow_controller.h" | 91 #include "ui/views/corewm/shadow_controller.h" |
| 92 #include "ui/views/corewm/visibility_controller.h" | 92 #include "ui/views/corewm/visibility_controller.h" |
| 93 #include "ui/views/corewm/window_modality_controller.h" | 93 #include "ui/views/corewm/window_modality_controller.h" |
| 94 #include "ui/views/focus/focus_manager_factory.h" | 94 #include "ui/views/focus/focus_manager_factory.h" |
| 95 #include "ui/views/widget/native_widget_aura.h" | 95 #include "ui/views/widget/native_widget_aura.h" |
| 96 #include "ui/views/widget/widget.h" | 96 #include "ui/views/widget/widget.h" |
| 97 #include "ui/views/window/dialog_frame_view.h" | 97 #include "ui/views/window/dialog_delegate.h" |
| 98 | 98 |
| 99 #if !defined(OS_MACOSX) | 99 #if !defined(OS_MACOSX) |
| 100 #include "ash/accelerators/accelerator_controller.h" | 100 #include "ash/accelerators/accelerator_controller.h" |
| 101 #include "ash/accelerators/accelerator_filter.h" | 101 #include "ash/accelerators/accelerator_filter.h" |
| 102 #include "ash/accelerators/nested_dispatcher_controller.h" | 102 #include "ash/accelerators/nested_dispatcher_controller.h" |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
| 106 #include "ash/ash_constants.h" | 106 #include "ash/ash_constants.h" |
| 107 #include "ash/display/display_change_observer_x11.h" | 107 #include "ash/display/display_change_observer_x11.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 ui::MODAL_TYPE_SYSTEM && (*wit)->TargetVisibility()) { | 650 ui::MODAL_TYPE_SYSTEM && (*wit)->TargetVisibility()) { |
| 651 return true; | 651 return true; |
| 652 } | 652 } |
| 653 } | 653 } |
| 654 } | 654 } |
| 655 return false; | 655 return false; |
| 656 } | 656 } |
| 657 | 657 |
| 658 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( | 658 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( |
| 659 views::Widget* widget) { | 659 views::Widget* widget) { |
| 660 if (CommandLine::ForCurrentProcess()->HasSwitch( | 660 if (views::DialogDelegate::UseNewStyle()) |
| 661 ::switches::kEnableNewDialogStyle)) { | 661 return views::DialogDelegate::CreateNewStyleFrameView(widget); |
| 662 return new views::DialogFrameView(string16()); | |
| 663 } | |
| 664 // Use translucent-style window frames for dialogs. | 662 // Use translucent-style window frames for dialogs. |
| 665 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; | 663 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; |
| 666 frame_view->Init(widget); | 664 frame_view->Init(widget); |
| 667 return frame_view; | 665 return frame_view; |
| 668 } | 666 } |
| 669 | 667 |
| 670 void Shell::RotateFocus(Direction direction) { | 668 void Shell::RotateFocus(Direction direction) { |
| 671 focus_cycler_->RotateFocus( | 669 focus_cycler_->RotateFocus( |
| 672 direction == FORWARD ? internal::FocusCycler::FORWARD : | 670 direction == FORWARD ? internal::FocusCycler::FORWARD : |
| 673 internal::FocusCycler::BACKWARD); | 671 internal::FocusCycler::BACKWARD); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 //////////////////////////////////////////////////////////////////////////////// | 934 //////////////////////////////////////////////////////////////////////////////// |
| 937 // Shell, aura::client::ActivationChangeObserver implementation: | 935 // Shell, aura::client::ActivationChangeObserver implementation: |
| 938 | 936 |
| 939 void Shell::OnWindowActivated(aura::Window* gained_active, | 937 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 940 aura::Window* lost_active) { | 938 aura::Window* lost_active) { |
| 941 if (gained_active) | 939 if (gained_active) |
| 942 active_root_window_ = gained_active->GetRootWindow(); | 940 active_root_window_ = gained_active->GetRootWindow(); |
| 943 } | 941 } |
| 944 | 942 |
| 945 } // namespace ash | 943 } // namespace ash |
| OLD | NEW |