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

Side by Side Diff: chrome/browser/views/extensions/extension_shelf.cc

Issue 208020: Change the view mode when switching between moles and toolstrips, and (Closed)
Patch Set: build system workarounds Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } 733 }
734 734
735 void ExtensionShelf::SetAccessibleName(const std::wstring& name) { 735 void ExtensionShelf::SetAccessibleName(const std::wstring& name) {
736 accessible_name_.assign(name); 736 accessible_name_.assign(name);
737 } 737 }
738 738
739 void ExtensionShelf::ThemeChanged() { 739 void ExtensionShelf::ThemeChanged() {
740 // Refresh the CSS to update toolstrip text colors from theme. 740 // Refresh the CSS to update toolstrip text colors from theme.
741 int count = model_->count(); 741 int count = model_->count();
742 for (int i = 0; i < count; ++i) 742 for (int i = 0; i < count; ++i)
743 ToolstripAtIndex(i)->view()->host()->InsertCssIfToolstrip(); 743 ToolstripAtIndex(i)->view()->host()->InsertThemeCSS();
744 744
745 Layout(); 745 Layout();
746 } 746 }
747 747
748 void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host, 748 void ExtensionShelf::ToolstripInsertedAt(ExtensionHost* host,
749 int index) { 749 int index) {
750 model_->SetToolstripDataAt(index, 750 model_->SetToolstripDataAt(index,
751 new Toolstrip(this, host, model_->ToolstripAt(index).info)); 751 new Toolstrip(this, host, model_->ToolstripAt(index).info));
752 752
753 bool had_views = GetChildViewCount() > 0; 753 bool had_views = GetChildViewCount() > 0;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 bool ExtensionShelf::IsAlwaysShown() const { 1043 bool ExtensionShelf::IsAlwaysShown() const {
1044 Profile* profile = browser_->profile(); 1044 Profile* profile = browser_->profile();
1045 return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf); 1045 return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf);
1046 } 1046 }
1047 1047
1048 bool ExtensionShelf::OnNewTabPage() const { 1048 bool ExtensionShelf::OnNewTabPage() const {
1049 return (browser_ && browser_->GetSelectedTabContents() && 1049 return (browser_ && browser_->GetSelectedTabContents() &&
1050 browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible()); 1050 browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible());
1051 } 1051 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/extensions_toolstrip.css ('k') | chrome/browser/views/extensions/extension_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698