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 <oleacc.h> | 8 #include <oleacc.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <wtsapi32.h> | 10 #include <wtsapi32.h> |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 }; | 330 }; |
331 | 331 |
332 //////////////////////////////////////////////////////////////////////////////// | 332 //////////////////////////////////////////////////////////////////////////////// |
333 // HWNDMessageHandler, public: | 333 // HWNDMessageHandler, public: |
334 | 334 |
335 long HWNDMessageHandler::last_touch_message_time_ = 0; | 335 long HWNDMessageHandler::last_touch_message_time_ = 0; |
336 | 336 |
337 HWNDMessageHandler::HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate) | 337 HWNDMessageHandler::HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate) |
338 : delegate_(delegate), | 338 : delegate_(delegate), |
339 fullscreen_handler_(new FullscreenHandler), | 339 fullscreen_handler_(new FullscreenHandler), |
340 weak_factory_(this), | |
341 waiting_for_close_now_(false), | 340 waiting_for_close_now_(false), |
342 remove_standard_frame_(false), | 341 remove_standard_frame_(false), |
343 use_system_default_icon_(false), | 342 use_system_default_icon_(false), |
344 restored_enabled_(false), | 343 restored_enabled_(false), |
345 current_cursor_(NULL), | 344 current_cursor_(NULL), |
346 previous_cursor_(NULL), | 345 previous_cursor_(NULL), |
347 active_mouse_tracking_flags_(0), | 346 active_mouse_tracking_flags_(0), |
348 is_right_mouse_pressed_on_caption_(false), | 347 is_right_mouse_pressed_on_caption_(false), |
349 lock_updates_count_(0), | 348 lock_updates_count_(0), |
350 ignore_window_pos_changes_(false), | 349 ignore_window_pos_changes_(false), |
351 last_monitor_(NULL), | 350 last_monitor_(NULL), |
352 use_layered_buffer_(false), | 351 use_layered_buffer_(false), |
353 layered_alpha_(255), | 352 layered_alpha_(255), |
354 waiting_for_redraw_layered_window_contents_(false), | 353 waiting_for_redraw_layered_window_contents_(false), |
355 is_first_nccalc_(true), | 354 is_first_nccalc_(true), |
356 menu_depth_(0), | 355 menu_depth_(0), |
357 autohide_factory_(this), | 356 autohide_factory_(this), |
358 id_generator_(0), | 357 id_generator_(0), |
359 needs_scroll_styles_(false), | 358 needs_scroll_styles_(false), |
360 in_size_loop_(false), | 359 in_size_loop_(false), |
361 touch_down_contexts_(0), | 360 touch_down_contexts_(0), |
362 last_mouse_hwheel_time_(0), | 361 last_mouse_hwheel_time_(0), |
363 msg_handled_(FALSE), | 362 msg_handled_(FALSE), |
364 dwm_transition_desired_(false) { | 363 dwm_transition_desired_(false), |
| 364 weak_factory_(this) { |
365 } | 365 } |
366 | 366 |
367 HWNDMessageHandler::~HWNDMessageHandler() { | 367 HWNDMessageHandler::~HWNDMessageHandler() { |
368 delegate_ = NULL; | 368 delegate_ = NULL; |
369 // Prevent calls back into this class via WNDPROC now that we've been | 369 // Prevent calls back into this class via WNDPROC now that we've been |
370 // destroyed. | 370 // destroyed. |
371 ClearUserData(); | 371 ClearUserData(); |
372 } | 372 } |
373 | 373 |
374 void HWNDMessageHandler::Init(HWND parent, const gfx::Rect& bounds) { | 374 void HWNDMessageHandler::Init(HWND parent, const gfx::Rect& bounds) { |
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); | 2864 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); |
2865 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); | 2865 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); |
2866 } | 2866 } |
2867 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want | 2867 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want |
2868 // to notify our children too, since we can have MDI child windows who need to | 2868 // to notify our children too, since we can have MDI child windows who need to |
2869 // update their appearance. | 2869 // update their appearance. |
2870 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); | 2870 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); |
2871 } | 2871 } |
2872 | 2872 |
2873 } // namespace views | 2873 } // namespace views |
OLD | NEW |