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

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

Issue 480353006: Separate athena's startup process from AppShell's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 9
10 #include "athena/common/container_priorities.h" 10 #include "athena/common/container_priorities.h"
11 #include "athena/env/public/athena_env.h"
11 #include "athena/home/app_list_view_delegate.h" 12 #include "athena/home/app_list_view_delegate.h"
12 #include "athena/home/athena_start_page_view.h" 13 #include "athena/home/athena_start_page_view.h"
13 #include "athena/home/minimized_home.h" 14 #include "athena/home/minimized_home.h"
14 #include "athena/home/public/app_model_builder.h" 15 #include "athena/home/public/app_model_builder.h"
15 #include "athena/input/public/accelerator_manager.h" 16 #include "athena/input/public/accelerator_manager.h"
16 #include "athena/screen/public/screen_manager.h" 17 #include "athena/screen/public/screen_manager.h"
17 #include "athena/wm/public/window_manager.h" 18 #include "athena/wm/public/window_manager.h"
18 #include "athena/wm/public/window_manager_observer.h" 19 #include "athena/wm/public/window_manager_observer.h"
19 #include "base/bind.h" 20 #include "base/bind.h"
20 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 home_card_view_->Layout(); 522 home_card_view_->Layout();
522 523
523 activation_client_ = 524 activation_client_ =
524 aura::client::GetActivationClient(container->GetRootWindow()); 525 aura::client::GetActivationClient(container->GetRootWindow());
525 if (activation_client_) 526 if (activation_client_)
526 activation_client_->AddObserver(this); 527 activation_client_->AddObserver(this);
527 528
528 int work_area_bottom_inset = 529 int work_area_bottom_inset =
529 GetBoundsForState(GetNativeWindow()->bounds(), 530 GetBoundsForState(GetNativeWindow()->bounds(),
530 HomeCard::VISIBLE_MINIMIZED).height(); 531 HomeCard::VISIBLE_MINIMIZED).height();
531 ScreenManager::Get()->SetWorkAreaInsets( 532 AthenaEnv::Get()->SetDisplayWorkAreaInsets(
532 gfx::Insets(0, 0, work_area_bottom_inset, 0)); 533 gfx::Insets(0, 0, work_area_bottom_inset, 0));
533 } 534 }
534 535
535 void HomeCardImpl::InstallAccelerators() { 536 void HomeCardImpl::InstallAccelerators() {
536 const AcceleratorData accelerator_data[] = { 537 const AcceleratorData accelerator_data[] = {
537 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN, 538 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN,
538 COMMAND_SHOW_HOME_CARD, AF_NONE}, 539 COMMAND_SHOW_HOME_CARD, AF_NONE},
539 }; 540 };
540 AcceleratorManager::Get()->RegisterAccelerators( 541 AcceleratorManager::Get()->RegisterAccelerators(
541 accelerator_data, arraysize(accelerator_data), this); 542 accelerator_data, arraysize(accelerator_data), this);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 instance = NULL; 665 instance = NULL;
665 } 666 }
666 667
667 // static 668 // static
668 HomeCard* HomeCard::Get() { 669 HomeCard* HomeCard::Get() {
669 DCHECK(instance); 670 DCHECK(instance);
670 return instance; 671 return instance;
671 } 672 }
672 673
673 } // namespace athena 674 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698