OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |