OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/extensions/extension_shelf.h" | 5 #include "chrome/browser/views/extensions/extension_shelf.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 void ExtensionShelf::OnMouseExited(const views::MouseEvent& event) { | 773 void ExtensionShelf::OnMouseExited(const views::MouseEvent& event) { |
774 } | 774 } |
775 | 775 |
776 bool ExtensionShelf::GetAccessibleRole(AccessibilityTypes::Role* role) { | 776 bool ExtensionShelf::GetAccessibleRole(AccessibilityTypes::Role* role) { |
777 DCHECK(role); | 777 DCHECK(role); |
778 | 778 |
779 *role = AccessibilityTypes::ROLE_TOOLBAR; | 779 *role = AccessibilityTypes::ROLE_TOOLBAR; |
780 return true; | 780 return true; |
781 } | 781 } |
782 | 782 |
783 void ExtensionShelf::ThemeChanged() { | 783 void ExtensionShelf::OnThemeChanged() { |
784 // Refresh the CSS to update toolstrip text colors from theme. | 784 // Refresh the CSS to update toolstrip text colors from theme. |
785 int count = model_->count(); | 785 int count = model_->count(); |
786 for (int i = 0; i < count; ++i) | 786 for (int i = 0; i < count; ++i) |
787 ToolstripAtIndex(i)->view()->host()->InsertThemedToolstripCSS(); | 787 ToolstripAtIndex(i)->view()->host()->InsertThemedToolstripCSS(); |
788 | 788 |
789 Layout(); | 789 Layout(); |
790 } | 790 } |
791 | 791 |
792 void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host, | 792 void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host, |
793 int index) { | 793 int index) { |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 } | 1098 } |
1099 | 1099 |
1100 void ExtensionShelf::OnFullscreenToggled(bool fullscreen) { | 1100 void ExtensionShelf::OnFullscreenToggled(bool fullscreen) { |
1101 if (fullscreen == fullscreen_) | 1101 if (fullscreen == fullscreen_) |
1102 return; | 1102 return; |
1103 fullscreen_ = fullscreen; | 1103 fullscreen_ = fullscreen; |
1104 if (!IsAlwaysShown()) | 1104 if (!IsAlwaysShown()) |
1105 return; | 1105 return; |
1106 size_animation_->Reset(fullscreen ? 0 : 1); | 1106 size_animation_->Reset(fullscreen ? 0 : 1); |
1107 } | 1107 } |
OLD | NEW |