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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "base/debug/leak_annotations.h" | 71 #include "base/debug/leak_annotations.h" |
72 #include "ui/aura/client/aura_constants.h" | 72 #include "ui/aura/client/aura_constants.h" |
73 #include "ui/aura/client/stacking_client.h" | 73 #include "ui/aura/client/stacking_client.h" |
74 #include "ui/aura/client/user_action_client.h" | 74 #include "ui/aura/client/user_action_client.h" |
75 #include "ui/aura/env.h" | 75 #include "ui/aura/env.h" |
76 #include "ui/aura/focus_manager.h" | 76 #include "ui/aura/focus_manager.h" |
77 #include "ui/aura/layout_manager.h" | 77 #include "ui/aura/layout_manager.h" |
78 #include "ui/aura/root_window.h" | 78 #include "ui/aura/root_window.h" |
79 #include "ui/aura/ui_controls_aura.h" | 79 #include "ui/aura/ui_controls_aura.h" |
80 #include "ui/aura/window.h" | 80 #include "ui/aura/window.h" |
| 81 #include "ui/base/ui_base_switches.h" |
81 #include "ui/compositor/layer.h" | 82 #include "ui/compositor/layer.h" |
82 #include "ui/compositor/layer_animator.h" | 83 #include "ui/compositor/layer_animator.h" |
83 #include "ui/gfx/display.h" | 84 #include "ui/gfx/display.h" |
84 #include "ui/gfx/image/image_skia.h" | 85 #include "ui/gfx/image/image_skia.h" |
85 #include "ui/gfx/screen.h" | 86 #include "ui/gfx/screen.h" |
86 #include "ui/gfx/size.h" | 87 #include "ui/gfx/size.h" |
87 #include "ui/ui_controls/ui_controls.h" | 88 #include "ui/ui_controls/ui_controls.h" |
88 #include "ui/views/corewm/compound_event_filter.h" | 89 #include "ui/views/corewm/compound_event_filter.h" |
89 #include "ui/views/corewm/corewm_switches.h" | 90 #include "ui/views/corewm/corewm_switches.h" |
90 #include "ui/views/corewm/focus_controller.h" | 91 #include "ui/views/corewm/focus_controller.h" |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 return true; | 623 return true; |
623 } | 624 } |
624 } | 625 } |
625 } | 626 } |
626 return false; | 627 return false; |
627 } | 628 } |
628 | 629 |
629 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( | 630 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( |
630 views::Widget* widget) { | 631 views::Widget* widget) { |
631 if (CommandLine::ForCurrentProcess()->HasSwitch( | 632 if (CommandLine::ForCurrentProcess()->HasSwitch( |
632 switches::kAuraGoogleDialogFrames)) { | 633 ::switches::kEnableNewDialogStyle)) { |
633 return new internal::DialogFrameView; | 634 return new internal::DialogFrameView; |
634 } | 635 } |
635 // Use translucent-style window frames for dialogs. | 636 // Use translucent-style window frames for dialogs. |
636 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; | 637 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh; |
637 frame_view->Init(widget); | 638 frame_view->Init(widget); |
638 return frame_view; | 639 return frame_view; |
639 } | 640 } |
640 | 641 |
641 void Shell::RotateFocus(Direction direction) { | 642 void Shell::RotateFocus(Direction direction) { |
642 focus_cycler_->RotateFocus( | 643 focus_cycler_->RotateFocus( |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 896 |
896 //////////////////////////////////////////////////////////////////////////////// | 897 //////////////////////////////////////////////////////////////////////////////// |
897 // Shell, aura::client::ActivationChangeObserver implementation: | 898 // Shell, aura::client::ActivationChangeObserver implementation: |
898 | 899 |
899 void Shell::OnWindowActivated(aura::Window* gained_active, | 900 void Shell::OnWindowActivated(aura::Window* gained_active, |
900 aura::Window* lost_active) { | 901 aura::Window* lost_active) { |
901 active_root_window_ = gained_active->GetRootWindow(); | 902 active_root_window_ = gained_active->GetRootWindow(); |
902 } | 903 } |
903 | 904 |
904 } // namespace ash | 905 } // namespace ash |
OLD | NEW |