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

Side by Side Diff: athena/home/home_card_impl.cc

Issue 322503005: Athena's FocusManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « athena/common/switches.cc ('k') | athena/input/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/home/public/home_card.h" 5 #include "athena/home/public/home_card.h"
6 6
7 #include "athena/home/app_list_view_delegate.h" 7 #include "athena/home/app_list_view_delegate.h"
8 #include "athena/input/public/accelerator_manager.h" 8 #include "athena/input/public/accelerator_manager.h"
9 #include "athena/input/public/input_manager.h"
10 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
11 #include "ui/app_list/pagination_model.h" 10 #include "ui/app_list/pagination_model.h"
12 #include "ui/app_list/views/app_list_view.h" 11 #include "ui/app_list/views/app_list_view.h"
13 #include "ui/aura/layout_manager.h" 12 #include "ui/aura/layout_manager.h"
14 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
15 #include "ui/wm/core/visibility_controller.h" 14 #include "ui/wm/core/visibility_controller.h"
16 #include "ui/wm/core/window_animations.h" 15 #include "ui/wm/core/window_animations.h"
17 16
18 namespace athena { 17 namespace athena {
19 namespace { 18 namespace {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 true /* border_accepts_events */); 126 true /* border_accepts_events */);
128 home_card_widget_ = view->GetWidget(); 127 home_card_widget_ = view->GetWidget();
129 view->ShowWhenReady(); 128 view->ShowWhenReady();
130 } 129 }
131 130
132 void HomeCardImpl::InstallAccelerators() { 131 void HomeCardImpl::InstallAccelerators() {
133 const AcceleratorData accelerator_data[] = { 132 const AcceleratorData accelerator_data[] = {
134 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN, 133 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN,
135 COMMAND_SHOW_HOME_CARD, AF_NONE}, 134 COMMAND_SHOW_HOME_CARD, AF_NONE},
136 }; 135 };
137 InputManager::Get()->GetAcceleratorManager()->RegisterAccelerators( 136 AcceleratorManager::Get()->RegisterAccelerators(
138 accelerator_data, arraysize(accelerator_data), this); 137 accelerator_data, arraysize(accelerator_data), this);
139 } 138 }
140 139
141 } // namespace 140 } // namespace
142 141
143 // static 142 // static
144 HomeCard* HomeCard::Create() { 143 HomeCard* HomeCard::Create() {
145 (new HomeCardImpl())->Init(); 144 (new HomeCardImpl())->Init();
146 DCHECK(instance); 145 DCHECK(instance);
147 return instance; 146 return instance;
148 } 147 }
149 148
150 // static 149 // static
151 void HomeCard::Shutdown() { 150 void HomeCard::Shutdown() {
152 DCHECK(instance); 151 DCHECK(instance);
153 delete instance; 152 delete instance;
154 instance = NULL; 153 instance = NULL;
155 } 154 }
156 155
157 } // namespace athena 156 } // namespace athena
OLDNEW
« no previous file with comments | « athena/common/switches.cc ('k') | athena/input/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698