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

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

Issue 1805393002: Added MediaRouterUIBrowserTest::toolbar_action_view_ to a Widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated incorrect doc. Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc » ('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) 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override { 237 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override {
238 if (!ShouldShowInkDropHover()) 238 if (!ShouldShowInkDropHover())
239 return nullptr; 239 return nullptr;
240 return make_scoped_ptr(new views::InkDropHover( 240 return make_scoped_ptr(new views::InkDropHover(
241 size(), 0, GetInkDropCenter(), GetInkDropBaseColor())); 241 size(), 0, GetInkDropCenter(), GetInkDropBaseColor()));
242 } 242 }
243 243
244 SkColor GetInkDropBaseColor() const override { 244 SkColor GetInkDropBaseColor() const override {
245 // TODO(bruthig): Inject the color instead of assuming a ThemeProvider is 245 return GetThemeProvider()->GetColor(
246 // always available. Fall back on LabelButton::GetInkDropBaseColor() so as 246 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
247 // to avoid difficult to track down crashes.
248 return GetThemeProvider()
249 ? GetThemeProvider()->GetColor(
250 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)
251 : views::LabelButton::GetInkDropBaseColor();
252 } 247 }
253 248
254 private: 249 private:
255 scoped_ptr<gfx::SlideAnimation> show_animation_; 250 scoped_ptr<gfx::SlideAnimation> show_animation_;
256 251
257 // Controls the visual feedback for the button state. 252 // Controls the visual feedback for the button state.
258 views::ButtonInkDropDelegate ink_drop_delegate_; 253 views::ButtonInkDropDelegate ink_drop_delegate_;
259 254
260 DISALLOW_COPY_AND_ASSIGN(BookmarkButtonBase); 255 DISALLOW_COPY_AND_ASSIGN(BookmarkButtonBase);
261 }; 256 };
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 333 }
339 334
340 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override { 335 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override {
341 if (!ShouldShowInkDropHover()) 336 if (!ShouldShowInkDropHover())
342 return nullptr; 337 return nullptr;
343 return make_scoped_ptr(new views::InkDropHover( 338 return make_scoped_ptr(new views::InkDropHover(
344 size(), 0, GetInkDropCenter(), GetInkDropBaseColor())); 339 size(), 0, GetInkDropCenter(), GetInkDropBaseColor()));
345 } 340 }
346 341
347 SkColor GetInkDropBaseColor() const override { 342 SkColor GetInkDropBaseColor() const override {
348 return GetThemeProvider() 343 return GetThemeProvider()->GetColor(
349 ? GetThemeProvider()->GetColor( 344 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
350 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)
351 : views::LabelButton::GetInkDropBaseColor();
352 } 345 }
353 346
354 private: 347 private:
355 // Controls the visual feedback for the button state. 348 // Controls the visual feedback for the button state.
356 views::ButtonInkDropDelegate ink_drop_delegate_; 349 views::ButtonInkDropDelegate ink_drop_delegate_;
357 350
358 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuButtonBase); 351 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuButtonBase);
359 }; 352 };
360 353
361 // BookmarkFolderButton ------------------------------------------------------- 354 // BookmarkFolderButton -------------------------------------------------------
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 return; 2150 return;
2158 apps_page_shortcut_->SetVisible(visible); 2151 apps_page_shortcut_->SetVisible(visible);
2159 UpdateBookmarksSeparatorVisibility(); 2152 UpdateBookmarksSeparatorVisibility();
2160 LayoutAndPaint(); 2153 LayoutAndPaint();
2161 } 2154 }
2162 2155
2163 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2156 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2164 if (UpdateOtherAndManagedButtonsVisibility()) 2157 if (UpdateOtherAndManagedButtonsVisibility())
2165 LayoutAndPaint(); 2158 LayoutAndPaint();
2166 } 2159 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698