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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 10173035: Add key modifier on minimize/restore button click to minimize/restore all Panels for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed IsActive checks from new test Created 8 years, 8 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 | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browsertest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/ui/panels/docked_panel_strip.h" 9 #include "chrome/browser/ui/panels/docked_panel_strip.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // activation may not have occurred. Also, some OSes (Windows) will 740 // activation may not have occurred. Also, some OSes (Windows) will
741 // activate a minimized panel on mouse-down regardless of our attempts to 741 // activate a minimized panel on mouse-down regardless of our attempts to
742 // prevent system activation. Attention state is not cleared in that case. 742 // prevent system activation. Attention state is not cleared in that case.
743 // See Panel::OnActiveStateChanged(). 743 // See Panel::OnActiveStateChanged().
744 // Therefore, we ensure activation and clearing of attention state here. 744 // Therefore, we ensure activation and clearing of attention state here.
745 // These are no-ops if no changes are needed. 745 // These are no-ops if no changes are needed.
746 Activate(); 746 Activate();
747 FlashFrame(false); 747 FlashFrame(false);
748 } 748 }
749 749
750 void Panel::OnMinimizeButtonClicked(panel::ClickModifier modifier) {
751 if (!panel_strip_)
752 return;
753
754 if (modifier == panel::APPLY_TO_ALL)
755 panel_strip_->MinimizeAll();
756 else
757 Minimize();
758 }
759
760 void Panel::OnRestoreButtonClicked(panel::ClickModifier modifier) {
761 if (!panel_strip_)
762 return;
763
764 if (modifier == panel::APPLY_TO_ALL)
765 panel_strip_->RestoreAll();
766 else
767 Restore();
768 }
769
750 void Panel::DestroyBrowser() { 770 void Panel::DestroyBrowser() {
751 native_panel_->DestroyPanelBrowser(); 771 native_panel_->DestroyPanelBrowser();
752 } 772 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698