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 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // See widget.h for documentation. | 55 // See widget.h for documentation. |
56 InputMethod* CreateInputMethod(); | 56 InputMethod* CreateInputMethod(); |
57 ui::InputMethod* GetHostInputMethod(); | 57 ui::InputMethod* GetHostInputMethod(); |
58 | 58 |
59 NativeWidgetMac* native_widget_mac() { return native_widget_mac_; } | 59 NativeWidgetMac* native_widget_mac() { return native_widget_mac_; } |
60 BridgedContentView* ns_view() { return bridged_view_; } | 60 BridgedContentView* ns_view() { return bridged_view_; } |
61 NSWindow* ns_window() { return window_; } | 61 NSWindow* ns_window() { return window_; } |
62 | 62 |
63 // Overridden from internal::InputMethodDelegate: | 63 // Overridden from internal::InputMethodDelegate: |
64 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE; | 64 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override; |
65 | 65 |
66 private: | 66 private: |
67 // Closes all child windows. BridgedNativeWidget children will be destroyed. | 67 // Closes all child windows. BridgedNativeWidget children will be destroyed. |
68 void RemoveOrDestroyChildren(); | 68 void RemoveOrDestroyChildren(); |
69 | 69 |
70 views::NativeWidgetMac* native_widget_mac_; // Weak. Owns this. | 70 views::NativeWidgetMac* native_widget_mac_; // Weak. Owns this. |
71 base::scoped_nsobject<NSWindow> window_; | 71 base::scoped_nsobject<NSWindow> window_; |
72 base::scoped_nsobject<ViewsNSWindowDelegate> window_delegate_; | 72 base::scoped_nsobject<ViewsNSWindowDelegate> window_delegate_; |
73 base::scoped_nsobject<BridgedContentView> bridged_view_; | 73 base::scoped_nsobject<BridgedContentView> bridged_view_; |
74 scoped_ptr<ui::InputMethod> input_method_; | 74 scoped_ptr<ui::InputMethod> input_method_; |
75 FocusManager* focus_manager_; // Weak. Owned by our Widget. | 75 FocusManager* focus_manager_; // Weak. Owned by our Widget. |
76 | 76 |
77 // Overridden from FocusChangeListener: | 77 // Overridden from FocusChangeListener: |
78 virtual void OnWillChangeFocus(View* focused_before, | 78 virtual void OnWillChangeFocus(View* focused_before, |
79 View* focused_now) OVERRIDE; | 79 View* focused_now) override; |
80 virtual void OnDidChangeFocus(View* focused_before, | 80 virtual void OnDidChangeFocus(View* focused_before, |
81 View* focused_now) OVERRIDE; | 81 View* focused_now) override; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); | 83 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace views | 86 } // namespace views |
87 | 87 |
88 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 88 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
OLD | NEW |