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

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

Issue 465803002: Make the minimized home card not overlap activities on Athena (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
« no previous file with comments | « no previous file | athena/main/athena_launcher.h » ('j') | athena/screen/public/screen_manager.h » ('J')
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 <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"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 widget_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 453 widget_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
454 home_card_widget_->Init(widget_params); 454 home_card_widget_->Init(widget_params);
455 455
456 SetState(VISIBLE_MINIMIZED); 456 SetState(VISIBLE_MINIMIZED);
457 home_card_view_->Layout(); 457 home_card_view_->Layout();
458 458
459 activation_client_ = 459 activation_client_ =
460 aura::client::GetActivationClient(container->GetRootWindow()); 460 aura::client::GetActivationClient(container->GetRootWindow());
461 if (activation_client_) 461 if (activation_client_)
462 activation_client_->AddObserver(this); 462 activation_client_->AddObserver(this);
463
464 int work_area_bottom_inset =
465 GetBoundsForState(GetNativeWindow()->bounds(),
466 HomeCard::VISIBLE_MINIMIZED).height();
467 ScreenManager::Get()->SetWorkAreaInsets(
468 gfx::Insets(0, 0, work_area_bottom_inset, 0));
463 } 469 }
464 470
465 void HomeCardImpl::InstallAccelerators() { 471 void HomeCardImpl::InstallAccelerators() {
466 const AcceleratorData accelerator_data[] = { 472 const AcceleratorData accelerator_data[] = {
467 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN, 473 {TRIGGER_ON_PRESS, ui::VKEY_L, ui::EF_CONTROL_DOWN,
468 COMMAND_SHOW_HOME_CARD, AF_NONE}, 474 COMMAND_SHOW_HOME_CARD, AF_NONE},
469 }; 475 };
470 AcceleratorManager::Get()->RegisterAccelerators( 476 AcceleratorManager::Get()->RegisterAccelerators(
471 accelerator_data, arraysize(accelerator_data), this); 477 accelerator_data, arraysize(accelerator_data), this);
472 } 478 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 instance = NULL; 600 instance = NULL;
595 } 601 }
596 602
597 // static 603 // static
598 HomeCard* HomeCard::Get() { 604 HomeCard* HomeCard::Get() {
599 DCHECK(instance); 605 DCHECK(instance);
600 return instance; 606 return instance;
601 } 607 }
602 608
603 } // namespace athena 609 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/main/athena_launcher.h » ('j') | athena/screen/public/screen_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698