OLD | NEW |
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 <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 552 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
553 } | 553 } |
554 | 554 |
555 void HWNDMessageHandler::StackAtTop() { | 555 void HWNDMessageHandler::StackAtTop() { |
556 SetWindowPos(hwnd(), HWND_TOP, 0, 0, 0, 0, | 556 SetWindowPos(hwnd(), HWND_TOP, 0, 0, 0, 0, |
557 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 557 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
558 } | 558 } |
559 | 559 |
560 void HWNDMessageHandler::Show() { | 560 void HWNDMessageHandler::Show() { |
561 if (IsWindow(hwnd())) | 561 if (IsWindow(hwnd())) |
562 ShowWindowWithState(ui::SHOW_STATE_INACTIVE); | 562 ShowWindowWithState(ui::SHOW_STATE_NORMAL); |
563 } | 563 } |
564 | 564 |
565 void HWNDMessageHandler::ShowWindowWithState(ui::WindowShowState show_state) { | 565 void HWNDMessageHandler::ShowWindowWithState(ui::WindowShowState show_state) { |
566 TRACE_EVENT0("views", "HWNDMessageHandler::ShowWindowWithState"); | 566 TRACE_EVENT0("views", "HWNDMessageHandler::ShowWindowWithState"); |
567 DWORD native_show_state; | 567 DWORD native_show_state; |
568 switch (show_state) { | 568 switch (show_state) { |
569 case ui::SHOW_STATE_INACTIVE: | 569 case ui::SHOW_STATE_INACTIVE: |
570 native_show_state = SW_SHOWNOACTIVATE; | 570 native_show_state = SW_SHOWNOACTIVATE; |
571 break; | 571 break; |
572 case ui::SHOW_STATE_MAXIMIZED: | 572 case ui::SHOW_STATE_MAXIMIZED: |
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 SetMsgHandled(FALSE); | 2241 SetMsgHandled(FALSE); |
2242 } | 2242 } |
2243 | 2243 |
2244 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) { | 2244 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) { |
2245 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); | 2245 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); |
2246 for (size_t i = 0; i < touch_events.size() && ref; ++i) | 2246 for (size_t i = 0; i < touch_events.size() && ref; ++i) |
2247 delegate_->HandleTouchEvent(touch_events[i]); | 2247 delegate_->HandleTouchEvent(touch_events[i]); |
2248 } | 2248 } |
2249 | 2249 |
2250 } // namespace views | 2250 } // namespace views |
OLD | NEW |