| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |