Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: ui/views/widget/native_widget_mac.h

Issue 1259513002: [MacViews] Use ChromeCommandDispatcherDelegate to handle keyboard shortcuts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commandexecute
Patch Set: Address comments. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/cocoa/native_widget_mac_nswindow.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WIDGET_NATIVE_WIDGET_MAC_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
7 7
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/views/widget/native_widget_private.h" 9 #include "ui/views/widget/native_widget_private.h"
10 10
11 #if defined(__OBJC__)
12 @class NativeWidgetMacNSWindow;
13 #else
14 class NativeWidgetMacNSWindow;
15 #endif
16
11 namespace views { 17 namespace views {
12 namespace test { 18 namespace test {
13 class HitTestNativeWidgetMac; 19 class HitTestNativeWidgetMac;
14 class MockNativeWidgetMac; 20 class MockNativeWidgetMac;
15 } 21 }
16 22
17 class BridgedNativeWidget; 23 class BridgedNativeWidget;
18 24
19 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { 25 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate {
20 public: 26 public:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Widget::VisibilityTransition transition) override; 124 Widget::VisibilityTransition transition) override;
119 ui::NativeTheme* GetNativeTheme() const override; 125 ui::NativeTheme* GetNativeTheme() const override;
120 void OnRootViewLayout() override; 126 void OnRootViewLayout() override;
121 bool IsTranslucentWindowOpacitySupported() const override; 127 bool IsTranslucentWindowOpacitySupported() const override;
122 void OnSizeConstraintsChanged() override; 128 void OnSizeConstraintsChanged() override;
123 void RepostNativeEvent(gfx::NativeEvent native_event) override; 129 void RepostNativeEvent(gfx::NativeEvent native_event) override;
124 130
125 protected: 131 protected:
126 // Creates the NSWindow that will be passed to the BridgedNativeWidget. 132 // Creates the NSWindow that will be passed to the BridgedNativeWidget.
127 // Called by InitNativeWidget. The return value will be autoreleased. 133 // Called by InitNativeWidget. The return value will be autoreleased.
128 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); 134 virtual NativeWidgetMacNSWindow* CreateNSWindow(
135 const Widget::InitParams& params);
129 136
130 internal::NativeWidgetDelegate* delegate() { return delegate_; } 137 internal::NativeWidgetDelegate* delegate() { return delegate_; }
131 138
132 private: 139 private:
133 friend class test::MockNativeWidgetMac; 140 friend class test::MockNativeWidgetMac;
134 friend class test::HitTestNativeWidgetMac; 141 friend class test::HitTestNativeWidgetMac;
135 142
136 internal::NativeWidgetDelegate* delegate_; 143 internal::NativeWidgetDelegate* delegate_;
137 scoped_ptr<BridgedNativeWidget> bridge_; 144 scoped_ptr<BridgedNativeWidget> bridge_;
138 145
139 Widget::InitParams::Ownership ownership_; 146 Widget::InitParams::Ownership ownership_;
140 147
141 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); 148 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
142 }; 149 };
143 150
144 } // namespace views 151 } // namespace views
145 152
146 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 153 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/native_widget_mac_nswindow.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698