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

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

Issue 411543006: Explicit container priority (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « athena/common/container_priorities.h ('k') | athena/home/minimized_home.cc » ('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 <limits> 7 #include <limits>
8 8
9 #include "athena/common/container_priorities.h"
9 #include "athena/home/app_list_view_delegate.h" 10 #include "athena/home/app_list_view_delegate.h"
10 #include "athena/home/bottom_home_view.h" 11 #include "athena/home/bottom_home_view.h"
11 #include "athena/home/minimized_home.h" 12 #include "athena/home/minimized_home.h"
12 #include "athena/home/public/app_model_builder.h" 13 #include "athena/home/public/app_model_builder.h"
13 #include "athena/input/public/accelerator_manager.h" 14 #include "athena/input/public/accelerator_manager.h"
14 #include "athena/screen/public/screen_manager.h" 15 #include "athena/screen/public/screen_manager.h"
15 #include "athena/wm/public/window_manager.h" 16 #include "athena/wm/public/window_manager.h"
16 #include "athena/wm/public/window_manager_observer.h" 17 #include "athena/wm/public/window_manager_observer.h"
17 #include "base/bind.h" 18 #include "base/bind.h"
18 #include "ui/app_list/search_provider.h" 19 #include "ui/app_list/search_provider.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } else if (state_ == VISIBLE_BOTTOM && !bounds.IsEmpty()) { 323 } else if (state_ == VISIBLE_BOTTOM && !bounds.IsEmpty()) {
323 SetState(VISIBLE_CENTERED); 324 SetState(VISIBLE_CENTERED);
324 original_state_ = VISIBLE_BOTTOM; 325 original_state_ = VISIBLE_BOTTOM;
325 } else if (state_ != original_state_ && bounds.IsEmpty()) { 326 } else if (state_ != original_state_ && bounds.IsEmpty()) {
326 SetState(original_state_); 327 SetState(original_state_);
327 } 328 }
328 } 329 }
329 330
330 void HomeCardImpl::Init() { 331 void HomeCardImpl::Init() {
331 InstallAccelerators(); 332 InstallAccelerators();
332 ScreenManager::ContainerParams params("HomeCardContainer"); 333 ScreenManager::ContainerParams params("HomeCardContainer", CP_HOME_CARD);
333 params.can_activate_children = true; 334 params.can_activate_children = true;
334 aura::Window* container = ScreenManager::Get()->CreateContainer(params); 335 aura::Window* container = ScreenManager::Get()->CreateContainer(params);
335 layout_manager_ = new HomeCardLayoutManager(this); 336 layout_manager_ = new HomeCardLayoutManager(this);
336 337
337 container->SetLayoutManager(layout_manager_); 338 container->SetLayoutManager(layout_manager_);
338 wm::SetChildWindowVisibilityChangesAnimated(container); 339 wm::SetChildWindowVisibilityChangesAnimated(container);
339 340
340 view_delegate_.reset(new AppListViewDelegate(model_builder_.get())); 341 view_delegate_.reset(new AppListViewDelegate(model_builder_.get()));
341 if (search_provider_) 342 if (search_provider_)
342 view_delegate_->RegisterSearchProvider(search_provider_.get()); 343 view_delegate_->RegisterSearchProvider(search_provider_.get());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 instance = NULL; 385 instance = NULL;
385 } 386 }
386 387
387 // static 388 // static
388 HomeCard* HomeCard::Get() { 389 HomeCard* HomeCard::Get() {
389 DCHECK(instance); 390 DCHECK(instance);
390 return instance; 391 return instance;
391 } 392 }
392 393
393 } // namespace athena 394 } // namespace athena
OLDNEW
« no previous file with comments | « athena/common/container_priorities.h ('k') | athena/home/minimized_home.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698