OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/chrome_menu.h" | 5 #include "chrome/views/chrome_menu.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <uxtheme.h> | 8 #include <uxtheme.h> |
9 #include <Vssym32.h> | 9 #include <Vssym32.h> |
10 | 10 |
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2756 else if (event.IsRightMouseButton()) | 2756 else if (event.IsRightMouseButton()) |
2757 event_type = in_client_area ? WM_RBUTTONDOWN : WM_NCRBUTTONDOWN; | 2757 event_type = in_client_area ? WM_RBUTTONDOWN : WM_NCRBUTTONDOWN; |
2758 else | 2758 else |
2759 event_type = 0; // Unknown mouse press. | 2759 event_type = 0; // Unknown mouse press. |
2760 | 2760 |
2761 if (event_type) { | 2761 if (event_type) { |
2762 if (in_client_area) { | 2762 if (in_client_area) { |
2763 PostMessage(window, event_type, event.GetWindowsFlags(), | 2763 PostMessage(window, event_type, event.GetWindowsFlags(), |
2764 MAKELPARAM(window_x, window_y)); | 2764 MAKELPARAM(window_x, window_y)); |
2765 } else { | 2765 } else { |
2766 PostMessage(window, WM_NCLBUTTONDOWN, nc_hit_result, | 2766 PostMessage(window, event_type, nc_hit_result, |
2767 MAKELPARAM(window_x, window_y)); | 2767 MAKELPARAM(screen_loc.x(), screen_loc.y())); |
2768 } | 2768 } |
2769 } | 2769 } |
2770 } | 2770 } |
2771 } | 2771 } |
2772 | 2772 |
2773 void MenuController::SetDropMenuItem( | 2773 void MenuController::SetDropMenuItem( |
2774 MenuItemView* new_target, | 2774 MenuItemView* new_target, |
2775 MenuDelegate::DropPosition new_position) { | 2775 MenuDelegate::DropPosition new_position) { |
2776 if (new_target == drop_target_ && new_position == drop_position_) | 2776 if (new_target == drop_target_ && new_position == drop_position_) |
2777 return; | 2777 return; |
(...skipping 17 matching lines...) Expand all Loading... |
2795 if (!scroll_task_.get()) | 2795 if (!scroll_task_.get()) |
2796 scroll_task_.reset(new MenuScrollTask()); | 2796 scroll_task_.reset(new MenuScrollTask()); |
2797 scroll_task_->Update(part); | 2797 scroll_task_->Update(part); |
2798 } | 2798 } |
2799 | 2799 |
2800 void MenuController::StopScrolling() { | 2800 void MenuController::StopScrolling() { |
2801 scroll_task_.reset(NULL); | 2801 scroll_task_.reset(NULL); |
2802 } | 2802 } |
2803 | 2803 |
2804 } // namespace views | 2804 } // namespace views |
OLD | NEW |