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

Side by Side Diff: chrome/browser/ui/views/frame/taskbar_decorator_win.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/elevation_icon_setter.cc ('k') | chrome/browser/ui/views/outdated_upgrade_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698