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

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

Issue 404563002: Athena's FocusRules (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 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/home/minimized_home.h" 8 #include "athena/home/minimized_home.h"
9 #include "athena/home/public/app_model_builder.h" 9 #include "athena/home/public/app_model_builder.h"
10 #include "athena/input/public/accelerator_manager.h" 10 #include "athena/input/public/accelerator_manager.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 if (bounds.IsEmpty()) 255 if (bounds.IsEmpty())
256 minimized_widget_->Show(); 256 minimized_widget_->Show();
257 else 257 else
258 minimized_widget_->Hide(); 258 minimized_widget_->Hide();
259 } 259 }
260 layout_manager_->UpdateVirtualKeyboardBounds(bounds); 260 layout_manager_->UpdateVirtualKeyboardBounds(bounds);
261 } 261 }
262 262
263 void HomeCardImpl::Init() { 263 void HomeCardImpl::Init() {
264 InstallAccelerators(); 264 InstallAccelerators();
265 ScreenManager::ContainerParams params("HomeCardContainer");
266 params.can_activate_children = true;
267 aura::Window* container = ScreenManager::Get()->CreateContainer(params);
268 layout_manager_ = new HomeCardLayoutManager(this);
265 269
266 aura::Window* container =
267 ScreenManager::Get()->CreateContainer("HomeCardContainer");
268 layout_manager_ = new HomeCardLayoutManager(this);
269 container->SetLayoutManager(layout_manager_); 270 container->SetLayoutManager(layout_manager_);
270 wm::SetChildWindowVisibilityChangesAnimated(container); 271 wm::SetChildWindowVisibilityChangesAnimated(container);
271 272
272 view_delegate_ = new AppListViewDelegate(model_builder_.get()); 273 view_delegate_ = new AppListViewDelegate(model_builder_.get());
273 if (search_provider_) 274 if (search_provider_)
274 view_delegate_->RegisterSearchProvider(search_provider_.get()); 275 view_delegate_->RegisterSearchProvider(search_provider_.get());
275 app_list::AppListView* view = new app_list::AppListView(view_delegate_); 276 app_list::AppListView* view = new app_list::AppListView(view_delegate_);
276 view->InitAsBubbleAtFixedLocation( 277 view->InitAsBubbleAtFixedLocation(
277 container, 278 container,
278 0 /* initial_apps_page */, 279 0 /* initial_apps_page */,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 instance = NULL; 312 instance = NULL;
312 } 313 }
313 314
314 // static 315 // static
315 HomeCard* HomeCard::Get() { 316 HomeCard* HomeCard::Get() {
316 DCHECK(instance); 317 DCHECK(instance);
317 return instance; 318 return instance;
318 } 319 }
319 320
320 } // namespace athena 321 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698