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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/corewm/cursor_height_provider_win.cc ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 1b693f8718e30fd682d56cb31f3612d1d025370c..d9aaf402d422f987dc71b1c5c91c5e064f2b4510 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -10,6 +10,8 @@
#include <tchar.h>
#include <tpcshrd.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/debug/alias.h"
@@ -813,15 +815,14 @@ void HWNDMessageHandler::FrameTypeChanged() {
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) {
if (!window_icon.isNull()) {
- base::win::ScopedHICON previous_icon = window_icon_.Pass();
- window_icon_ =
- IconUtil::CreateHICONFromSkBitmap(*window_icon.bitmap()).Pass();
+ base::win::ScopedHICON previous_icon = std::move(window_icon_);
+ window_icon_ = IconUtil::CreateHICONFromSkBitmap(*window_icon.bitmap());
SendMessage(hwnd(), WM_SETICON, ICON_SMALL,
reinterpret_cast<LPARAM>(window_icon_.get()));
}
if (!app_icon.isNull()) {
- base::win::ScopedHICON previous_icon = app_icon_.Pass();
- app_icon_ = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap()).Pass();
+ base::win::ScopedHICON previous_icon = std::move(app_icon_);
+ app_icon_ = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap());
SendMessage(hwnd(), WM_SETICON, ICON_BIG,
reinterpret_cast<LPARAM>(app_icon_.get()));
}
« no previous file with comments | « ui/views/corewm/cursor_height_provider_win.cc ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698