Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: ash/app_list/app_list.cc

Issue 9264002: aura: Add Ctrl-Shift-Q for quit and Ctrl-Shift-L for lock in chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/app_list/app_list.h" 5 #include "ash/app_list/app_list.h"
6 6
7 #include "ash/app_list/app_list_model.h" 7 #include "ash/app_list/app_list_model.h"
8 #include "ash/app_list/app_list_view.h" 8 #include "ash/app_list/app_list_view.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 Shell::GetInstance()->RemoveRootWindowEventFilter(this); 113 Shell::GetInstance()->RemoveRootWindowEventFilter(this);
114 widget_ = NULL; 114 widget_ = NULL;
115 } 115 }
116 116
117 void AppList::ScheduleAnimation() { 117 void AppList::ScheduleAnimation() {
118 ui::Layer* layer = GetLayer(widget_); 118 ui::Layer* layer = GetLayer(widget_);
119 ui::ScopedLayerAnimationSettings app_list_animation(layer->GetAnimator()); 119 ui::ScopedLayerAnimationSettings app_list_animation(layer->GetAnimator());
120 layer->SetBounds(GetPreferredBounds(is_visible_)); 120 layer->SetBounds(GetPreferredBounds(is_visible_));
121 layer->SetOpacity(is_visible_ ? 1.0 : 0.0); 121 layer->SetOpacity(is_visible_ ? 1.0 : 0.0);
122 122
123 ui::Layer* default_container_layer = Shell::GetInstance()->GetContainer( 123 aura::Window* default_container = Shell::GetInstance()->GetContainer(
124 internal::kShellWindowId_DefaultContainer)->layer(); 124 internal::kShellWindowId_DefaultContainer);
125 if (!default_container)
126 return;
127 ui::Layer* default_container_layer = default_container->layer();
125 ui::ScopedLayerAnimationSettings default_container_animation( 128 ui::ScopedLayerAnimationSettings default_container_animation(
126 default_container_layer->GetAnimator()); 129 default_container_layer->GetAnimator());
127 default_container_layer->SetOpacity(is_visible_ ? 0.0 : 1.0); 130 default_container_layer->SetOpacity(is_visible_ ? 0.0 : 1.0);
128 } 131 }
129 132
130 //////////////////////////////////////////////////////////////////////////////// 133 ////////////////////////////////////////////////////////////////////////////////
131 // AppList, aura::EventFilter implementation: 134 // AppList, aura::EventFilter implementation:
132 135
133 bool AppList::PreHandleKeyEvent(aura::Window* target, 136 bool AppList::PreHandleKeyEvent(aura::Window* target,
134 aura::KeyEvent* event) { 137 aura::KeyEvent* event) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 187 }
185 188
186 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) { 189 void AppList::OnWidgetActivationChanged(views::Widget* widget, bool active) {
187 DCHECK(widget_ == widget); 190 DCHECK(widget_ == widget);
188 if (widget_ && is_visible_ && !active) 191 if (widget_ && is_visible_ && !active)
189 SetVisible(false); 192 SetVisible(false);
190 } 193 }
191 194
192 } // namespace internal 195 } // namespace internal
193 } // namespace ash 196 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/activation_controller.cc » ('j') | chrome/browser/chrome_browser_main_extra_parts_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698