OLD | NEW |
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/gtk/tabs/tab_renderer_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 void TabRendererGtk::UpdateData(TabContents* contents, | 325 void TabRendererGtk::UpdateData(TabContents* contents, |
326 bool app, | 326 bool app, |
327 bool loading_only) { | 327 bool loading_only) { |
328 DCHECK(contents); | 328 DCHECK(contents); |
329 TabContentsWrapper* wrapper = | 329 TabContentsWrapper* wrapper = |
330 TabContentsWrapper::GetCurrentWrapperForContents(contents); | 330 TabContentsWrapper::GetCurrentWrapperForContents(contents); |
331 | 331 |
332 if (!loading_only) { | 332 if (!loading_only) { |
333 data_.title = contents->GetTitle(); | 333 data_.title = contents->GetTitle(); |
334 data_.incognito = contents->GetBrowserContext()->IsOffTheRecord(); | 334 data_.incognito = contents->GetBrowserContext()->IsOffTheRecord(); |
335 data_.crashed = contents->is_crashed(); | 335 data_.crashed = contents->IsCrashed(); |
336 | 336 |
337 SkBitmap* app_icon = | 337 SkBitmap* app_icon = |
338 TabContentsWrapper::GetCurrentWrapperForContents(contents)-> | 338 TabContentsWrapper::GetCurrentWrapperForContents(contents)-> |
339 extension_tab_helper()->GetExtensionAppIcon(); | 339 extension_tab_helper()->GetExtensionAppIcon(); |
340 if (app_icon) { | 340 if (app_icon) { |
341 data_.favicon = *app_icon; | 341 data_.favicon = *app_icon; |
342 } else { | 342 } else { |
343 data_.favicon = wrapper->favicon_tab_helper()->GetFavicon(); | 343 data_.favicon = wrapper->favicon_tab_helper()->GetFavicon(); |
344 } | 344 } |
345 | 345 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 | 1124 |
1125 close_button_width_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->width(); | 1125 close_button_width_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->width(); |
1126 close_button_height_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->height(); | 1126 close_button_height_ = rb.GetBitmapNamed(IDR_TAB_CLOSE)->height(); |
1127 | 1127 |
1128 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); | 1128 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); |
1129 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); | 1129 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); |
1130 title_font_height_ = title_font_->GetHeight(); | 1130 title_font_height_ = title_font_->GetHeight(); |
1131 | 1131 |
1132 initialized_ = true; | 1132 initialized_ = true; |
1133 } | 1133 } |
OLD | NEW |