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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 years, 7 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/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/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 648
649 SkBitmap TabRendererGtk::PaintBitmap() { 649 SkBitmap TabRendererGtk::PaintBitmap() {
650 gfx::CanvasSkia canvas(width(), height(), false); 650 gfx::CanvasSkia canvas(width(), height(), false);
651 Paint(&canvas); 651 Paint(&canvas);
652 return canvas.ExtractBitmap(); 652 return canvas.ExtractBitmap();
653 } 653 }
654 654
655 cairo_surface_t* TabRendererGtk::PaintToSurface() { 655 cairo_surface_t* TabRendererGtk::PaintToSurface() {
656 gfx::CanvasSkia canvas(width(), height(), false); 656 gfx::CanvasSkia canvas(width(), height(), false);
657 Paint(&canvas); 657 Paint(&canvas);
658 return cairo_surface_reference(cairo_get_target(canvas.beginPlatformPaint())); 658 return cairo_surface_reference(cairo_get_target(
659 skia::BeginPlatformPaint(&canvas)));
659 } 660 }
660 661
661 void TabRendererGtk::SchedulePaint() { 662 void TabRendererGtk::SchedulePaint() {
662 gtk_widget_queue_draw(tab_.get()); 663 gtk_widget_queue_draw(tab_.get());
663 } 664 }
664 665
665 gfx::Rect TabRendererGtk::GetLocalBounds() { 666 gfx::Rect TabRendererGtk::GetLocalBounds() {
666 return gfx::Rect(0, 0, bounds_.width(), bounds_.height()); 667 return gfx::Rect(0, 0, bounds_.width(), bounds_.height());
667 } 668 }
668 669
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 1088
1088 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 1089 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
1089 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); 1090 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont);
1090 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); 1091 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize);
1091 title_font_height_ = title_font_->GetHeight(); 1092 title_font_height_ = title_font_->GetHeight();
1092 1093
1093 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); 1094 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON);
1094 1095
1095 initialized_ = true; 1096 initialized_ = true;
1096 } 1097 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/thumbnail_generator_unittest.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698