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

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

Issue 9021046: Pass const gfx::Rect& as the first parameter to FillRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more fix Created 8 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
OLDNEW
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/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // Since the drop indicator is painted directly onto the canvas, we must 654 // Since the drop indicator is painted directly onto the canvas, we must
655 // make sure it is painted in the right location if the locale is RTL. 655 // make sure it is painted in the right location if the locale is RTL.
656 gfx::Rect indicator_bounds(x - kDropIndicatorWidth / 2, 656 gfx::Rect indicator_bounds(x - kDropIndicatorWidth / 2,
657 y, 657 y,
658 kDropIndicatorWidth, 658 kDropIndicatorWidth,
659 h); 659 h);
660 indicator_bounds.set_x(GetMirroredXForRect(indicator_bounds)); 660 indicator_bounds.set_x(GetMirroredXForRect(indicator_bounds));
661 661
662 // TODO(sky/glen): make me pretty! 662 // TODO(sky/glen): make me pretty!
663 canvas->FillRect(kDropIndicatorColor, indicator_bounds); 663 canvas->FillRect(indicator_bounds, kDropIndicatorColor);
664 } 664 }
665 } 665 }
666 666
667 bool BookmarkBarView::GetDropFormats( 667 bool BookmarkBarView::GetDropFormats(
668 int* formats, 668 int* formats,
669 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { 669 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {
670 if (!model_ || !model_->IsLoaded()) 670 if (!model_ || !model_->IsLoaded())
671 return false; 671 return false;
672 *formats = ui::OSExchangeData::URL; 672 *formats = ui::OSExchangeData::URL;
673 custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat()); 673 custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat());
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 (1 - size_animation_->GetCurrentValue()))); 1662 (1 - size_animation_->GetCurrentValue())));
1663 } else { 1663 } else {
1664 prefsize.set_height( 1664 prefsize.set_height(
1665 static_cast<int>( 1665 static_cast<int>(
1666 browser_defaults::kBookmarkBarHeight * 1666 browser_defaults::kBookmarkBarHeight *
1667 size_animation_->GetCurrentValue())); 1667 size_animation_->GetCurrentValue()));
1668 } 1668 }
1669 } 1669 }
1670 return prefsize; 1670 return prefsize;
1671 } 1671 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.cc ('k') | chrome/browser/ui/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698