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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 3 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) 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/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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 bool loading_only) { 326 bool loading_only) {
327 DCHECK(contents); 327 DCHECK(contents);
328 TabContents* tab_contents = TabContents::FromWebContents(contents); 328 TabContents* tab_contents = TabContents::FromWebContents(contents);
329 329
330 if (!loading_only) { 330 if (!loading_only) {
331 data_.title = contents->GetTitle(); 331 data_.title = contents->GetTitle();
332 data_.incognito = contents->GetBrowserContext()->IsOffTheRecord(); 332 data_.incognito = contents->GetBrowserContext()->IsOffTheRecord();
333 data_.crashed = contents->IsCrashed(); 333 data_.crashed = contents->IsCrashed();
334 334
335 SkBitmap* app_icon = 335 SkBitmap* app_icon =
336 tab_contents->extension_tab_helper()->GetExtensionAppIcon(); 336 extensions::TabHelper::FromWebContents(contents)->GetExtensionAppIcon();
337 if (app_icon) { 337 if (app_icon) {
338 data_.favicon = *app_icon; 338 data_.favicon = *app_icon;
339 } else { 339 } else {
340 data_.favicon = 340 data_.favicon =
341 tab_contents->favicon_tab_helper()->GetFavicon().AsBitmap(); 341 tab_contents->favicon_tab_helper()->GetFavicon().AsBitmap();
342 } 342 }
343 343
344 data_.app = app; 344 data_.app = app;
345 345
346 // Make a cairo cached version of the favicon. 346 // Make a cairo cached version of the favicon.
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 GdkPixbuf* tab_close = rb.GetNativeImageNamed(IDR_TAB_CLOSE).ToGdkPixbuf(); 1121 GdkPixbuf* tab_close = rb.GetNativeImageNamed(IDR_TAB_CLOSE).ToGdkPixbuf();
1122 close_button_width_ = gdk_pixbuf_get_width(tab_close); 1122 close_button_width_ = gdk_pixbuf_get_width(tab_close);
1123 close_button_height_ = gdk_pixbuf_get_height(tab_close); 1123 close_button_height_ = gdk_pixbuf_get_height(tab_close);
1124 1124
1125 const gfx::Font& base_font = rb.GetFont(ui::ResourceBundle::BaseFont); 1125 const gfx::Font& base_font = rb.GetFont(ui::ResourceBundle::BaseFont);
1126 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); 1126 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize);
1127 title_font_height_ = title_font_->GetHeight(); 1127 title_font_height_ = title_font_->GetHeight();
1128 1128
1129 initialized_ = true; 1129 initialized_ = true;
1130 } 1130 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc ('k') | chrome/browser/ui/sync/tab_contents_synced_tab_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698