| 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/controls/native/native_view_host_test_base.h" | 5 #include "ui/views/controls/native/native_view_host_test_base.h" |
| 6 | 6 |
| 7 #include "ui/views/controls/native/native_view_host.h" | 7 #include "ui/views/controls/native/native_view_host.h" |
| 8 #include "ui/views/widget/widget.h" | 8 #include "ui/views/widget/widget.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 namespace test { | 11 namespace test { |
| 12 | 12 |
| 13 // Testing wrapper of the NativeViewHost. | 13 // Testing wrapper of the NativeViewHost. |
| 14 class NativeViewHostTestBase::NativeViewHostTesting : public NativeViewHost { | 14 class NativeViewHostTestBase::NativeViewHostTesting : public NativeViewHost { |
| 15 public: | 15 public: |
| 16 explicit NativeViewHostTesting(NativeViewHostTestBase* owner) | 16 explicit NativeViewHostTesting(NativeViewHostTestBase* owner) |
| 17 : owner_(owner) {} | 17 : owner_(owner) {} |
| 18 virtual ~NativeViewHostTesting() { owner_->host_destroyed_count_++; } | 18 ~NativeViewHostTesting() override { owner_->host_destroyed_count_++; } |
| 19 | 19 |
| 20 private: | 20 private: |
| 21 NativeViewHostTestBase* owner_; | 21 NativeViewHostTestBase* owner_; |
| 22 | 22 |
| 23 DISALLOW_COPY_AND_ASSIGN(NativeViewHostTesting); | 23 DISALLOW_COPY_AND_ASSIGN(NativeViewHostTesting); |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 NativeViewHostTestBase::NativeViewHostTestBase() : host_destroyed_count_(0) { | 26 NativeViewHostTestBase::NativeViewHostTestBase() : host_destroyed_count_(0) { |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 NativeViewHost* NativeViewHostTestBase::ReleaseHost() { | 71 NativeViewHost* NativeViewHostTestBase::ReleaseHost() { |
| 72 return host_.release(); | 72 return host_.release(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 NativeViewHostWrapper* NativeViewHostTestBase::GetNativeWrapper() { | 75 NativeViewHostWrapper* NativeViewHostTestBase::GetNativeWrapper() { |
| 76 return host_->native_wrapper_.get(); | 76 return host_->native_wrapper_.get(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace test | 79 } // namespace test |
| 80 } // namespace views | 80 } // namespace views |
| OLD | NEW |