OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ui/views/cocoa/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #import "base/mac/foundation_util.h" | 12 #import "base/mac/foundation_util.h" |
13 #include "base/mac/mac_util.h" | 13 #include "base/mac/mac_util.h" |
14 #import "base/mac/sdk_forward_declarations.h" | 14 #import "base/mac/sdk_forward_declarations.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/single_thread_task_runner.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 18 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
18 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h" | 19 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h" |
19 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
20 #include "ui/base/ime/input_method.h" | 21 #include "ui/base/ime/input_method.h" |
21 #include "ui/base/ime/input_method_factory.h" | 22 #include "ui/base/ime/input_method_factory.h" |
22 #include "ui/base/layout.h" | 23 #include "ui/base/layout.h" |
23 #include "ui/gfx/geometry/dip_util.h" | 24 #include "ui/gfx/geometry/dip_util.h" |
24 #import "ui/gfx/mac/coordinate_conversion.h" | 25 #import "ui/gfx/mac/coordinate_conversion.h" |
25 #import "ui/gfx/mac/nswindow_frame_controls.h" | 26 #import "ui/gfx/mac/nswindow_frame_controls.h" |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 [bridged_view_ setMouseDownCanMoveWindow:draggable]; | 1428 [bridged_view_ setMouseDownCanMoveWindow:draggable]; |
1428 // AppKit will not update its cache of mouseDownCanMoveWindow unless something | 1429 // AppKit will not update its cache of mouseDownCanMoveWindow unless something |
1429 // changes. Previously we tried adding an NSView and removing it, but for some | 1430 // changes. Previously we tried adding an NSView and removing it, but for some |
1430 // reason it required reposting the mouse-down event, and didn't always work. | 1431 // reason it required reposting the mouse-down event, and didn't always work. |
1431 // Calling the below seems to be an effective solution. | 1432 // Calling the below seems to be an effective solution. |
1432 [window_ setMovableByWindowBackground:NO]; | 1433 [window_ setMovableByWindowBackground:NO]; |
1433 [window_ setMovableByWindowBackground:YES]; | 1434 [window_ setMovableByWindowBackground:YES]; |
1434 } | 1435 } |
1435 | 1436 |
1436 } // namespace views | 1437 } // namespace views |
OLD | NEW |