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

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

Issue 332463002: Maximize only normal/popup window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/wm/DEPS » ('j') | athena/wm/window_manager_impl.cc » ('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 "athena/home/app_list_view_delegate.h" 7 #include "athena/home/app_list_view_delegate.h"
8 #include "athena/input/public/accelerator_manager.h" 8 #include "athena/input/public/accelerator_manager.h"
9 #include "athena/screen/public/screen_manager.h" 9 #include "athena/screen/public/screen_manager.h"
10 #include "ui/app_list/pagination_model.h" 10 #include "ui/app_list/pagination_model.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 enum Command { 80 enum Command {
81 COMMAND_SHOW_HOME_CARD, 81 COMMAND_SHOW_HOME_CARD,
82 }; 82 };
83 void InstallAccelerators(); 83 void InstallAccelerators();
84 84
85 // AcceleratorHandler: 85 // AcceleratorHandler:
86 virtual bool IsCommandEnabled(int command_id) const OVERRIDE { return true; } 86 virtual bool IsCommandEnabled(int command_id) const OVERRIDE { return true; }
87 virtual bool OnAcceleratorFired(int command_id, 87 virtual bool OnAcceleratorFired(int command_id,
88 const ui::Accelerator& accelerator) OVERRIDE { 88 const ui::Accelerator& accelerator) OVERRIDE {
89 DCHECK_EQ(COMMAND_SHOW_HOME_CARD, command_id); 89 DCHECK_EQ(COMMAND_SHOW_HOME_CARD, command_id);
90 home_card_widget_->Show(); 90 if (home_card_widget_->IsVisible())
91 home_card_widget_->Hide();
92 else
93 home_card_widget_->Show();
91 return true; 94 return true;
92 } 95 }
93 96
94 views::Widget* home_card_widget_; 97 views::Widget* home_card_widget_;
95 98
96 DISALLOW_COPY_AND_ASSIGN(HomeCardImpl); 99 DISALLOW_COPY_AND_ASSIGN(HomeCardImpl);
97 }; 100 };
98 101
99 HomeCardImpl::HomeCardImpl() 102 HomeCardImpl::HomeCardImpl()
100 : home_card_widget_(NULL) { 103 : home_card_widget_(NULL) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 150 }
148 151
149 // static 152 // static
150 void HomeCard::Shutdown() { 153 void HomeCard::Shutdown() {
151 DCHECK(instance); 154 DCHECK(instance);
152 delete instance; 155 delete instance;
153 instance = NULL; 156 instance = NULL;
154 } 157 }
155 158
156 } // namespace athena 159 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/wm/DEPS » ('j') | athena/wm/window_manager_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698