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

Side by Side Diff: chrome/browser/ui/gtk/custom_button.cc

Issue 231883003: [stash] 20140404-crbug-312961-mac-views-bridge-C-wholegrid Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/custom_button.h" 5 #include "chrome/browser/ui/gtk/custom_button.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
11 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" 11 #include "chrome/browser/ui/gtk/gtk_chrome_button.h"
12 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 12 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
13 #include "chrome/browser/ui/gtk/gtk_util.h" 13 #include "chrome/browser/ui/gtk/gtk_util.h"
14 #include "content/public/browser/notification_source.h" 14 #include "content/public/browser/notification_source.h"
15 #include "grit/theme_resources.h" 15 #include "grit/theme_resources.h"
16 #include "grit/ui_resources.h" 16 #include "grit/ui_resources.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 17 #include "third_party/skia/include/core/SkBitmap.h"
18 #include "ui/base/accessibility/accessibility_types.h"
18 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
19 #include "ui/gfx/gtk_util.h" 20 #include "ui/gfx/gtk_util.h"
20 #include "ui/gfx/image/cairo_cached_surface.h" 21 #include "ui/gfx/image/cairo_cached_surface.h"
21 #include "ui/gfx/image/image.h" 22 #include "ui/gfx/image/image.h"
22 #include "ui/gfx/skbitmap_operations.h" 23 #include "ui/gfx/skbitmap_operations.h"
23 24
24 namespace { 25 namespace {
25 26
26 GdkPixbuf* GetImage(int resource_id) { 27 GdkPixbuf* GetImage(int resource_id) {
27 if (!resource_id) 28 if (!resource_id)
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 389 }
389 390
390 gtk_chrome_button_set_use_gtk_rendering( 391 gtk_chrome_button_set_use_gtk_rendering(
391 GTK_CHROME_BUTTON(widget()), UseGtkTheme()); 392 GTK_CHROME_BUTTON(widget()), UseGtkTheme());
392 } 393 }
393 394
394 bool CustomDrawButton::UseGtkTheme() { 395 bool CustomDrawButton::UseGtkTheme() {
395 return !forcing_chrome_theme_ && theme_service_ && 396 return !forcing_chrome_theme_ && theme_service_ &&
396 theme_service_->UsingNativeTheme(); 397 theme_service_->UsingNativeTheme();
397 } 398 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views.cc ('k') | skia/ext/skia_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698