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

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

Issue 192041: [chromium-reviews] Make BrowserView layout both extension shelf and bookmarks bar if toolstrips ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 } 698 }
699 699
700 gfx::Size ExtensionShelf::GetPreferredSize() { 700 gfx::Size ExtensionShelf::GetPreferredSize() {
701 return LayoutItems(true); 701 return LayoutItems(true);
702 } 702 }
703 703
704 void ExtensionShelf::ChildPreferredSizeChanged(View* child) { 704 void ExtensionShelf::ChildPreferredSizeChanged(View* child) {
705 Toolstrip *toolstrip = ToolstripForView(static_cast<ExtensionView*>(child)); 705 Toolstrip *toolstrip = ToolstripForView(static_cast<ExtensionView*>(child));
706 if (!toolstrip) 706 if (!toolstrip)
707 return; 707 return;
708 Layout(); 708
709 PreferredSizeChanged();
709 } 710 }
710 711
711 void ExtensionShelf::Layout() { 712 void ExtensionShelf::Layout() {
712 LayoutItems(false); 713 LayoutItems(false);
713 } 714 }
714 715
715 716
716 void ExtensionShelf::OnMouseEntered(const views::MouseEvent& event) { 717 void ExtensionShelf::OnMouseEntered(const views::MouseEvent& event) {
717 } 718 }
718 719
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 1018
1018 bool ExtensionShelf::IsAlwaysShown() { 1019 bool ExtensionShelf::IsAlwaysShown() {
1019 Profile* profile = browser_->profile(); 1020 Profile* profile = browser_->profile();
1020 return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf); 1021 return profile->GetPrefs()->GetBoolean(prefs::kShowExtensionShelf);
1021 } 1022 }
1022 1023
1023 bool ExtensionShelf::OnNewTabPage() { 1024 bool ExtensionShelf::OnNewTabPage() {
1024 return (browser_ && browser_->GetSelectedTabContents() && 1025 return (browser_ && browser_->GetSelectedTabContents() &&
1025 browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible()); 1026 browser_->GetSelectedTabContents()->IsExtensionShelfAlwaysVisible());
1026 } 1027 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698