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 #include "ui/views/widget/native_widget_mac.h" | 5 #include "ui/views/widget/native_widget_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 // interactive_ui_tests target. See http://crbug.com/403679. | 31 // interactive_ui_tests target. See http://crbug.com/403679. |
32 ui_controls::EnableUIControls(); | 32 ui_controls::EnableUIControls(); |
33 } | 33 } |
34 | 34 |
35 Widget* MakeWidget() { | 35 Widget* MakeWidget() { |
36 return GetParam() ? CreateTopLevelFramelessPlatformWidget() | 36 return GetParam() ? CreateTopLevelFramelessPlatformWidget() |
37 : CreateTopLevelPlatformWidget(); | 37 : CreateTopLevelPlatformWidget(); |
38 } | 38 } |
39 | 39 |
40 protected: | 40 protected: |
41 scoped_ptr<Observer> observer_; | 41 std::unique_ptr<Observer> observer_; |
42 int activationCount_; | 42 int activationCount_; |
43 int deactivationCount_; | 43 int deactivationCount_; |
44 | 44 |
45 private: | 45 private: |
46 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMacInteractiveUITest); | 46 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMacInteractiveUITest); |
47 }; | 47 }; |
48 | 48 |
49 class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver { | 49 class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver { |
50 public: | 50 public: |
51 Observer(NativeWidgetMacInteractiveUITest* parent, Widget* widget) | 51 Observer(NativeWidgetMacInteractiveUITest* parent, Widget* widget) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 other_widget->CloseNow(); | 211 other_widget->CloseNow(); |
212 parent_widget->CloseNow(); | 212 parent_widget->CloseNow(); |
213 } | 213 } |
214 | 214 |
215 INSTANTIATE_TEST_CASE_P(NativeWidgetMacInteractiveUITestInstance, | 215 INSTANTIATE_TEST_CASE_P(NativeWidgetMacInteractiveUITestInstance, |
216 NativeWidgetMacInteractiveUITest, | 216 NativeWidgetMacInteractiveUITest, |
217 ::testing::Bool()); | 217 ::testing::Bool()); |
218 | 218 |
219 } // namespace test | 219 } // namespace test |
220 } // namespace views | 220 } // namespace views |
OLD | NEW |