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

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

Issue 1682603002: [UI Views] Don't allow a ButtonListener and a MenuButtonListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 4 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
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/tab_icon_view.h" 5 #include "chrome/browser/ui/views/tab_icon_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif 10 #endif
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DestroyIcon(app_icon); 50 DestroyIcon(app_icon);
51 #else 51 #else
52 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 52 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
53 g_default_favicon = rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_16); 53 g_default_favicon = rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_16);
54 #endif 54 #endif
55 } 55 }
56 } 56 }
57 57
58 TabIconView::TabIconView(TabIconViewModel* model, 58 TabIconView::TabIconView(TabIconViewModel* model,
59 views::MenuButtonListener* listener) 59 views::MenuButtonListener* listener)
60 : views::MenuButton(NULL, base::string16(), listener, false), 60 : views::MenuButton(base::string16(), listener, false),
61 model_(model), 61 model_(model),
62 is_light_(false) { 62 is_light_(false) {
63 InitializeIfNeeded(); 63 InitializeIfNeeded();
64 } 64 }
65 65
66 TabIconView::~TabIconView() { 66 TabIconView::~TabIconView() {
67 } 67 }
68 68
69 void TabIconView::Update() { 69 void TabIconView::Update() {
70 if (!model_->ShouldTabIconViewAnimate()) 70 if (!model_->ShouldTabIconViewAnimate())
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView(); 131 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView();
132 if (!favicon.isNull()) { 132 if (!favicon.isNull()) {
133 rendered = true; 133 rendered = true;
134 PaintFavicon(canvas, favicon); 134 PaintFavicon(canvas, favicon);
135 } 135 }
136 } 136 }
137 137
138 if (!rendered) 138 if (!rendered)
139 PaintFavicon(canvas, *g_default_favicon); 139 PaintFavicon(canvas, *g_default_favicon);
140 } 140 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_menu_button.cc ('k') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698