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

Side by Side Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 20423: Preliminary fullscreen mode support.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/views/bookmark_bar_view.h ('k') | chrome/browser/views/frame/browser_view.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/bookmark_bar_view.h" 5 #include "chrome/browser/views/bookmark_bar_view.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/base_drag_source.h" 9 #include "base/base_drag_source.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 index = parent_node->GetChildCount(); 1098 index = parent_node->GetChildCount();
1099 } else if (drop_on) { 1099 } else if (drop_on) {
1100 parent_node = root->GetChild(index); 1100 parent_node = root->GetChild(index);
1101 index = parent_node->GetChildCount(); 1101 index = parent_node->GetChildCount();
1102 } else { 1102 } else {
1103 parent_node = root; 1103 parent_node = root;
1104 } 1104 }
1105 return PerformDropImpl(data, parent_node, index); 1105 return PerformDropImpl(data, parent_node, index);
1106 } 1106 }
1107 1107
1108 void BookmarkBarView::OnFullscreenToggled(bool fullscreen) {
1109 if (!fullscreen)
1110 size_animation_->Reset(IsAlwaysShown() ? 1 : 0);
1111 else if (IsAlwaysShown())
1112 size_animation_->Reset(0);
1113 }
1114
1108 bool BookmarkBarView::IsDetachedStyle() { 1115 bool BookmarkBarView::IsDetachedStyle() {
1109 return OnNewTabPage() && (size_animation_->GetCurrentValue() != 1); 1116 return OnNewTabPage() && (size_animation_->GetCurrentValue() != 1);
1110 } 1117 }
1111 1118
1112 bool BookmarkBarView::IsAlwaysShown() { 1119 bool BookmarkBarView::IsAlwaysShown() {
1113 return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); 1120 return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
1114 } 1121 }
1115 1122
1116 bool BookmarkBarView::OnNewTabPage() { 1123 bool BookmarkBarView::OnNewTabPage() {
1117 return (browser_ && browser_->GetSelectedTabContents() && 1124 return (browser_ && browser_->GetSelectedTabContents() &&
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 } 1857 }
1851 1858
1852 void BookmarkBarView::StopThrobbing(bool immediate) { 1859 void BookmarkBarView::StopThrobbing(bool immediate) {
1853 if (!throbbing_view_) 1860 if (!throbbing_view_)
1854 return; 1861 return;
1855 1862
1856 // If not immediate, cycle through 2 more complete cycles. 1863 // If not immediate, cycle through 2 more complete cycles.
1857 throbbing_view_->StartThrobbing(immediate ? 0 : 4); 1864 throbbing_view_->StartThrobbing(immediate ? 0 : 4);
1858 throbbing_view_ = NULL; 1865 throbbing_view_ = NULL;
1859 } 1866 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698