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

Side by Side Diff: chrome/browser/ui/touch/tabs/touch_tab.cc

Issue 6693021: fav icon -> favicon. Pass 5: fav_icon -> favicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
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/touch/tabs/touch_tab.h" 5 #include "chrome/browser/ui/touch/tabs/touch_tab.h"
6 6
7 #include "chrome/browser/themes/browser_theme_provider.h" 7 #include "chrome/browser/themes/browser_theme_provider.h"
8 #include "grit/app_resources.h" 8 #include "grit/app_resources.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 IDR_THROBBER_WAITING : IDR_THROBBER)); 186 IDR_THROBBER_WAITING : IDR_THROBBER));
187 int image_size = frames.height(); 187 int image_size = frames.height();
188 int image_offset = loading_animation_frame() * image_size; 188 int image_offset = loading_animation_frame() * image_size;
189 canvas->DrawBitmapInt(frames, image_offset, 0, image_size, image_size, x, y, 189 canvas->DrawBitmapInt(frames, image_offset, 0, image_size, image_size, x, y,
190 kTouchFaviconSize, kTouchFaviconSize, false); 190 kTouchFaviconSize, kTouchFaviconSize, false);
191 } else { 191 } else {
192 canvas->Save(); 192 canvas->Save();
193 canvas->ClipRectInt(0, 0, width(), height()); 193 canvas->ClipRectInt(0, 0, width(), height());
194 if (should_display_crashed_favicon()) { 194 if (should_display_crashed_favicon()) {
195 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 195 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
196 SkBitmap crashed_fav_icon(*rb.GetBitmapNamed(IDR_SAD_FAVICON)); 196 SkBitmap crashed_favicon(*rb.GetBitmapNamed(IDR_SAD_FAVICON));
197 canvas->DrawBitmapInt(crashed_fav_icon, 0, 0, crashed_fav_icon.width(), 197 canvas->DrawBitmapInt(crashed_favicon, 0, 0, crashed_favicon.width(),
198 crashed_fav_icon.height(), x, y + fav_icon_hiding_offset(), 198 crashed_favicon.height(), x, y + favicon_hiding_offset(),
199 kTouchFaviconSize, kTouchFaviconSize, true); 199 kTouchFaviconSize, kTouchFaviconSize, true);
200 } else { 200 } else {
201 if (!data().favicon.isNull()) { 201 if (!data().favicon.isNull()) {
202 canvas->DrawBitmapInt(data().favicon, 0, 0, 202 canvas->DrawBitmapInt(data().favicon, 0, 0,
203 data().favicon.width(), data().favicon.height(), 203 data().favicon.width(), data().favicon.height(),
204 x, y + fav_icon_hiding_offset(), 204 x, y + favicon_hiding_offset(),
205 kTouchFaviconSize, kTouchFaviconSize, true); 205 kTouchFaviconSize, kTouchFaviconSize, true);
206 } 206 }
207 } 207 }
208 canvas->Restore(); 208 canvas->Restore();
209 } 209 }
210 } 210 }
211 211
212 // static 212 // static
213 void TouchTab::InitTabResources() { 213 void TouchTab::InitTabResources() {
214 static bool initialized = false; 214 static bool initialized = false;
(...skipping 20 matching lines...) Expand all
235 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); 235 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT);
236 tab_active.l_width = tab_active.image_l->width(); 236 tab_active.l_width = tab_active.image_l->width();
237 tab_active.r_width = tab_active.image_r->width(); 237 tab_active.r_width = tab_active.image_r->width();
238 238
239 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); 239 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT);
240 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); 240 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER);
241 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); 241 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT);
242 tab_inactive.l_width = tab_inactive.image_l->width(); 242 tab_inactive.l_width = tab_inactive.image_l->width();
243 tab_inactive.r_width = tab_inactive.image_r->width(); 243 tab_inactive.r_width = tab_inactive.image_r->width();
244 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698