OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/frame/taskbar_decorator_win.h" | 5 #include "chrome/browser/ui/views/frame/taskbar_decorator_win.h" |
6 | 6 |
7 #include <shobjidl.h> | 7 #include <shobjidl.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Copy the image since we're going to use it on a separate thread and | 81 // Copy the image since we're going to use it on a separate thread and |
82 // gfx::Image isn't thread safe. | 82 // gfx::Image isn't thread safe. |
83 std::unique_ptr<SkBitmap> bitmap; | 83 std::unique_ptr<SkBitmap> bitmap; |
84 if (image) { | 84 if (image) { |
85 bitmap.reset(new SkBitmap( | 85 bitmap.reset(new SkBitmap( |
86 profiles::GetAvatarIconAsSquare(*image->ToSkBitmap(), 1))); | 86 profiles::GetAvatarIconAsSquare(*image->ToSkBitmap(), 1))); |
87 } | 87 } |
88 // TODO(robliao): Annotate this task with .WithCOM() once supported. | 88 // TODO(robliao): Annotate this task with .WithCOM() once supported. |
89 // https://crbug.com/662122 | 89 // https://crbug.com/662122 |
90 base::PostTaskWithTraits( | 90 base::PostTaskWithTraits( |
91 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 91 FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE}, |
92 base::TaskPriority::USER_VISIBLE), | |
93 base::Bind(&SetOverlayIcon, hwnd, base::Passed(&bitmap))); | 92 base::Bind(&SetOverlayIcon, hwnd, base::Passed(&bitmap))); |
94 } | 93 } |
95 | 94 |
96 } // namespace chrome | 95 } // namespace chrome |
OLD | NEW |