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

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

Issue 6525055: Fix bug with other bookmarks painting... a couple of methods hadn't been rena... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // the context menu. They should not trigger the opening of underlying urls. 195 // the context menu. They should not trigger the opening of underlying urls.
196 if (e.flags() == ui::EF_LEFT_BUTTON_DOWN || 196 if (e.flags() == ui::EF_LEFT_BUTTON_DOWN ||
197 e.flags() == ui::EF_RIGHT_BUTTON_DOWN) 197 e.flags() == ui::EF_RIGHT_BUTTON_DOWN)
198 return false; 198 return false;
199 199
200 WindowOpenDisposition disposition( 200 WindowOpenDisposition disposition(
201 event_utils::DispositionFromEventFlags(e.flags())); 201 event_utils::DispositionFromEventFlags(e.flags()));
202 return disposition != CURRENT_TAB; 202 return disposition != CURRENT_TAB;
203 } 203 }
204 204
205 virtual void Paint(gfx::Canvas* canvas) { 205 virtual void OnPaint(gfx::Canvas* canvas) {
206 views::MenuButton::Paint(canvas, false); 206 views::MenuButton::Paint(canvas, false);
207 } 207 }
208 208
209 private: 209 private:
210 scoped_ptr<ui::SlideAnimation> show_animation_; 210 scoped_ptr<ui::SlideAnimation> show_animation_;
211 211
212 DISALLOW_COPY_AND_ASSIGN(BookmarkFolderButton); 212 DISALLOW_COPY_AND_ASSIGN(BookmarkFolderButton);
213 }; 213 };
214 214
215 // OverFlowButton (chevron) -------------------------------------------------- 215 // OverFlowButton (chevron) --------------------------------------------------
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 BookmarkNodeData data; 280 BookmarkNodeData data;
281 }; 281 };
282 282
283 // ButtonSeparatorView -------------------------------------------------------- 283 // ButtonSeparatorView --------------------------------------------------------
284 284
285 class BookmarkBarView::ButtonSeparatorView : public views::View { 285 class BookmarkBarView::ButtonSeparatorView : public views::View {
286 public: 286 public:
287 ButtonSeparatorView() {} 287 ButtonSeparatorView() {}
288 virtual ~ButtonSeparatorView() {} 288 virtual ~ButtonSeparatorView() {}
289 289
290 virtual void Paint(gfx::Canvas* canvas) { 290 virtual void OnPaint(gfx::Canvas* canvas) {
291 DetachableToolbarView::PaintVerticalDivider( 291 DetachableToolbarView::PaintVerticalDivider(
292 canvas, kSeparatorStartX, height(), 1, 292 canvas, kSeparatorStartX, height(), 1,
293 DetachableToolbarView::kEdgeDividerColor, 293 DetachableToolbarView::kEdgeDividerColor,
294 DetachableToolbarView::kMiddleDividerColor, 294 DetachableToolbarView::kMiddleDividerColor,
295 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TOOLBAR)); 295 GetThemeProvider()->GetColor(BrowserThemeProvider::COLOR_TOOLBAR));
296 } 296 }
297 297
298 virtual gfx::Size GetPreferredSize() { 298 virtual gfx::Size GetPreferredSize() {
299 // We get the full height of the bookmark bar, so that the height returned 299 // We get the full height of the bookmark bar, so that the height returned
300 // here doesn't matter. 300 // here doesn't matter.
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 // The tooltip is the only way we have to display text explaining the error 1747 // The tooltip is the only way we have to display text explaining the error
1748 // to the user. 1748 // to the user.
1749 sync_error_button->SetTooltipText( 1749 sync_error_button->SetTooltipText(
1750 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); 1750 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)));
1751 sync_error_button->SetAccessibleName( 1751 sync_error_button->SetAccessibleName(
1752 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1752 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1753 sync_error_button->SetIcon( 1753 sync_error_button->SetIcon(
1754 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1754 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1755 return sync_error_button; 1755 return sync_error_button;
1756 } 1756 }
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