OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/elevation_icon_setter.h" | 5 #include "chrome/browser/ui/views/elevation_icon_setter.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/task_runner_util.h" | 8 #include "base/task_runner_util.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
11 #include "ui/views/controls/button/label_button.h" | 12 #include "ui/views/controls/button/label_button.h" |
12 | 13 |
13 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
14 #include <windows.h> | 15 #include <windows.h> |
15 #include <shellapi.h> | 16 #include <shellapi.h> |
16 #include "base/win/win_util.h" | 17 #include "base/win/win_util.h" |
17 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
18 #include "ui/display/win/dpi.h" | 19 #include "ui/display/win/dpi.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 button_->SetImage( | 87 button_->SetImage( |
87 views::Button::STATE_NORMAL, | 88 views::Button::STATE_NORMAL, |
88 gfx::ImageSkia(gfx::ImageSkiaRep(*icon, device_scale_factor))); | 89 gfx::ImageSkia(gfx::ImageSkiaRep(*icon, device_scale_factor))); |
89 button_->SizeToPreferredSize(); | 90 button_->SizeToPreferredSize(); |
90 if (button_->parent()) | 91 if (button_->parent()) |
91 button_->parent()->Layout(); | 92 button_->parent()->Layout(); |
92 if (!callback.is_null()) | 93 if (!callback.is_null()) |
93 callback.Run(); | 94 callback.Run(); |
94 } | 95 } |
95 } | 96 } |
OLD | NEW |