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

Side by Side 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, 9 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 | « ui/views/corewm/cursor_height_provider_win.cc ('k') | win8/metro_driver/ime/text_service.cc » ('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 "ui/views/win/hwnd_message_handler.h" 5 #include "ui/views/win/hwnd_message_handler.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <tchar.h> 10 #include <tchar.h>
11 #include <tpcshrd.h> 11 #include <tpcshrd.h>
12 12
13 #include <utility>
14
13 #include "base/bind.h" 15 #include "base/bind.h"
14 #include "base/bind_helpers.h" 16 #include "base/bind_helpers.h"
15 #include "base/debug/alias.h" 17 #include "base/debug/alias.h"
16 #include "base/macros.h" 18 #include "base/macros.h"
17 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
18 #include "base/win/scoped_gdi_object.h" 20 #include "base/win/scoped_gdi_object.h"
19 #include "base/win/windows_version.h" 21 #include "base/win/windows_version.h"
20 #include "ui/base/touch/touch_enabled.h" 22 #include "ui/base/touch/touch_enabled.h"
21 #include "ui/base/view_prop.h" 23 #include "ui/base/view_prop.h"
22 #include "ui/base/win/internal_constants.h" 24 #include "ui/base/win/internal_constants.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 if (!custom_window_region_.is_valid() && !delegate_->IsUsingCustomFrame()) 808 if (!custom_window_region_.is_valid() && !delegate_->IsUsingCustomFrame())
807 dwm_transition_desired_ = true; 809 dwm_transition_desired_ = true;
808 if (!dwm_transition_desired_ || !fullscreen_handler_->fullscreen()) 810 if (!dwm_transition_desired_ || !fullscreen_handler_->fullscreen())
809 PerformDwmTransition(); 811 PerformDwmTransition();
810 } 812 }
811 } 813 }
812 814
813 void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, 815 void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
814 const gfx::ImageSkia& app_icon) { 816 const gfx::ImageSkia& app_icon) {
815 if (!window_icon.isNull()) { 817 if (!window_icon.isNull()) {
816 base::win::ScopedHICON previous_icon = window_icon_.Pass(); 818 base::win::ScopedHICON previous_icon = std::move(window_icon_);
817 window_icon_ = 819 window_icon_ = IconUtil::CreateHICONFromSkBitmap(*window_icon.bitmap());
818 IconUtil::CreateHICONFromSkBitmap(*window_icon.bitmap()).Pass();
819 SendMessage(hwnd(), WM_SETICON, ICON_SMALL, 820 SendMessage(hwnd(), WM_SETICON, ICON_SMALL,
820 reinterpret_cast<LPARAM>(window_icon_.get())); 821 reinterpret_cast<LPARAM>(window_icon_.get()));
821 } 822 }
822 if (!app_icon.isNull()) { 823 if (!app_icon.isNull()) {
823 base::win::ScopedHICON previous_icon = app_icon_.Pass(); 824 base::win::ScopedHICON previous_icon = std::move(app_icon_);
824 app_icon_ = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap()).Pass(); 825 app_icon_ = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap());
825 SendMessage(hwnd(), WM_SETICON, ICON_BIG, 826 SendMessage(hwnd(), WM_SETICON, ICON_BIG,
826 reinterpret_cast<LPARAM>(app_icon_.get())); 827 reinterpret_cast<LPARAM>(app_icon_.get()));
827 } 828 }
828 } 829 }
829 830
830 void HWNDMessageHandler::SetFullscreen(bool fullscreen) { 831 void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
831 background_fullscreen_hack_ = false; 832 background_fullscreen_hack_ = false;
832 fullscreen_handler()->SetFullscreen(fullscreen); 833 fullscreen_handler()->SetFullscreen(fullscreen);
833 // If we are out of fullscreen and there was a pending DWM transition for the 834 // If we are out of fullscreen and there was a pending DWM transition for the
834 // window, then go ahead and do it now. 835 // window, then go ahead and do it now.
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size()); 2631 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size());
2631 ResetWindowRegion(false, true); 2632 ResetWindowRegion(false, true);
2632 } 2633 }
2633 2634
2634 if (direct_manipulation_helper_) 2635 if (direct_manipulation_helper_)
2635 direct_manipulation_helper_->SetBounds(bounds_in_pixels); 2636 direct_manipulation_helper_->SetBounds(bounds_in_pixels);
2636 } 2637 }
2637 2638
2638 2639
2639 } // namespace views 2640 } // namespace views
OLDNEW
« 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