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

Side by Side Diff: trunk/src/chrome/browser/ui/gtk/panels/panel_gtk.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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/panels/panel_gtk.h" 5 #include "chrome/browser/ui/gtk/panels/panel_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <X11/XF86keysym.h> 9 #include <X11/XF86keysym.h>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const AcceleratorMapping& entry = kAcceleratorMap[i]; 137 const AcceleratorMapping& entry = kAcceleratorMap[i];
138 ui::Accelerator accelerator = ui::AcceleratorForGdkKeyCodeAndModifier( 138 ui::Accelerator accelerator = ui::AcceleratorForGdkKeyCodeAndModifier(
139 entry.keyval, entry.modifier_type); 139 entry.keyval, entry.modifier_type);
140 accelerator_table[accelerator] = entry.command_id; 140 accelerator_table[accelerator] = entry.command_id;
141 } 141 }
142 } 142 }
143 return accelerator_table; 143 return accelerator_table;
144 } 144 }
145 145
146 gfx::Image CreateImageForColor(SkColor color) { 146 gfx::Image CreateImageForColor(SkColor color) {
147 gfx::Canvas canvas(gfx::Size(1, 1), 1.0f, true); 147 gfx::Canvas canvas(gfx::Size(1, 1), ui::SCALE_FACTOR_100P, true);
148 canvas.DrawColor(color); 148 canvas.DrawColor(color);
149 return gfx::Image(gfx::ImageSkia(canvas.ExtractImageRep())); 149 return gfx::Image(gfx::ImageSkia(canvas.ExtractImageRep()));
150 } 150 }
151 151
152 const gfx::Image GetActiveBackgroundDefaultImage() { 152 const gfx::Image GetActiveBackgroundDefaultImage() {
153 CR_DEFINE_STATIC_LOCAL(gfx::Image, image, ()); 153 CR_DEFINE_STATIC_LOCAL(gfx::Image, image, ());
154 if (image.IsEmpty()) 154 if (image.IsEmpty())
155 image = CreateImageForColor(kActiveBackgroundDefaultColor); 155 image = CreateImageForColor(kActiveBackgroundDefaultColor);
156 return image; 156 return image;
157 } 157 }
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1246 }
1247 1247
1248 panel::CornerStyle GtkNativePanelTesting::GetWindowCornerStyle() const { 1248 panel::CornerStyle GtkNativePanelTesting::GetWindowCornerStyle() const {
1249 return panel_gtk_->corner_style_; 1249 return panel_gtk_->corner_style_;
1250 } 1250 }
1251 1251
1252 bool GtkNativePanelTesting::EnsureApplicationRunOnForeground() { 1252 bool GtkNativePanelTesting::EnsureApplicationRunOnForeground() {
1253 // Not needed on GTK. 1253 // Not needed on GTK.
1254 return true; 1254 return true;
1255 } 1255 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc ('k') | trunk/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698