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

Side by Side Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 6681041: fav icon -> favicon. Pass 3: kFavIconSize -> kFaviconSize (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
« no previous file with comments | « chrome/browser/ui/views/tab_icon_view.cc ('k') | chrome/browser/ui/views/tabs/side_tab.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) 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/tabs/base_tab.h" 5 #include "chrome/browser/ui/views/tabs/base_tab.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 loading_animation_frame_ = 0; 411 loading_animation_frame_ = 0;
412 } 412 }
413 ScheduleIconPaint(); 413 ScheduleIconPaint();
414 } 414 }
415 415
416 void BaseTab::PaintIcon(gfx::Canvas* canvas) { 416 void BaseTab::PaintIcon(gfx::Canvas* canvas) {
417 gfx::Rect bounds = GetIconBounds(); 417 gfx::Rect bounds = GetIconBounds();
418 if (bounds.IsEmpty()) 418 if (bounds.IsEmpty())
419 return; 419 return;
420 420
421 // The size of bounds has to be kFavIconSize x kFavIconSize. 421 // The size of bounds has to be kFaviconSize x kFaviconSize.
422 DCHECK_EQ(kFavIconSize, bounds.width()); 422 DCHECK_EQ(kFaviconSize, bounds.width());
423 DCHECK_EQ(kFavIconSize, bounds.height()); 423 DCHECK_EQ(kFaviconSize, bounds.height());
424 424
425 bounds.set_x(GetMirroredXForRect(bounds)); 425 bounds.set_x(GetMirroredXForRect(bounds));
426 426
427 if (data().network_state != TabRendererData::NETWORK_STATE_NONE) { 427 if (data().network_state != TabRendererData::NETWORK_STATE_NONE) {
428 ui::ThemeProvider* tp = GetThemeProvider(); 428 ui::ThemeProvider* tp = GetThemeProvider();
429 SkBitmap frames(*tp->GetBitmapNamed( 429 SkBitmap frames(*tp->GetBitmapNamed(
430 (data().network_state == TabRendererData::NETWORK_STATE_WAITING) ? 430 (data().network_state == TabRendererData::NETWORK_STATE_WAITING) ?
431 IDR_THROBBER_WAITING : IDR_THROBBER)); 431 IDR_THROBBER_WAITING : IDR_THROBBER));
432 432
433 int icon_size = frames.height(); 433 int icon_size = frames.height();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // static 564 // static
565 void BaseTab::InitResources() { 565 void BaseTab::InitResources() {
566 static bool initialized = false; 566 static bool initialized = false;
567 if (!initialized) { 567 if (!initialized) {
568 initialized = true; 568 initialized = true;
569 font_ = new gfx::Font( 569 font_ = new gfx::Font(
570 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); 570 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont));
571 font_height_ = font_->GetHeight(); 571 font_height_ = font_->GetHeight();
572 } 572 }
573 } 573 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_icon_view.cc ('k') | chrome/browser/ui/views/tabs/side_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698