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

Unified Diff: athena/home/home_card_impl.cc

Issue 663623002: Don't hide home card upon activation change (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/home/home_card_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/home_card_impl.cc
diff --git a/athena/home/home_card_impl.cc b/athena/home/home_card_impl.cc
index de3ee7aac784d6eaff05738e9dc675258a5e2683..9825d9246c7539e2032284a1f4e0bef7e99cb55f 100644
--- a/athena/home/home_card_impl.cc
+++ b/athena/home/home_card_impl.cc
@@ -28,7 +28,6 @@
#include "ui/views/widget/widget_delegate.h"
#include "ui/wm/core/shadow_types.h"
#include "ui/wm/core/visibility_controller.h"
-#include "ui/wm/public/activation_client.h"
namespace athena {
namespace {
@@ -229,8 +228,7 @@ HomeCardImpl::HomeCardImpl(scoped_ptr<AppModelBuilder> model_builder,
original_state_(VISIBLE_MINIMIZED),
home_card_widget_(NULL),
home_card_view_(NULL),
- layout_manager_(NULL),
- activation_client_(NULL) {
+ layout_manager_(NULL) {
DCHECK(!instance);
instance = this;
WindowManager::Get()->AddObserver(this);
@@ -239,8 +237,6 @@ HomeCardImpl::HomeCardImpl(scoped_ptr<AppModelBuilder> model_builder,
HomeCardImpl::~HomeCardImpl() {
DCHECK(instance);
WindowManager::Get()->RemoveObserver(this);
- if (activation_client_)
- activation_client_->RemoveObserver(this);
home_card_widget_->CloseNow();
// Reset the view delegate first as it access search provider during
@@ -279,11 +275,6 @@ void HomeCardImpl::Init() {
SetState(VISIBLE_MINIMIZED);
home_card_view_->Layout();
- activation_client_ =
- aura::client::GetActivationClient(container->GetRootWindow());
- if (activation_client_)
- activation_client_->AddObserver(this);
-
AthenaEnv::Get()->SetDisplayWorkAreaInsets(
gfx::Insets(0, 0, kHomeCardMinimizedHeight, 0));
}
@@ -426,14 +417,6 @@ void HomeCardImpl::OnSplitViewModeEnter() {
void HomeCardImpl::OnSplitViewModeExit() {
}
-void HomeCardImpl::OnWindowActivated(aura::Window* gained_active,
- aura::Window* lost_active) {
- if (state_ != HIDDEN &&
- gained_active != home_card_widget_->GetNativeWindow()) {
- SetState(VISIBLE_MINIMIZED);
- }
-}
-
// static
HomeCard* HomeCard::Create(scoped_ptr<AppModelBuilder> model_builder,
scoped_ptr<SearchControllerFactory> search_factory) {
« no previous file with comments | « athena/home/home_card_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698