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

Side by Side Diff: ui/aura/test/aura_test_base.h

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_TEST_AURA_TEST_BASE_H_ 5 #ifndef UI_AURA_TEST_AURA_TEST_BASE_H_
6 #define UI_AURA_TEST_AURA_TEST_BASE_H_ 6 #define UI_AURA_TEST_AURA_TEST_BASE_H_
7 7
8 #include "base/at_exit.h"
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
10 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/aura/test/aura_test_helper.h" 13 #include "ui/aura/test/aura_test_helper.h"
13 14
14 namespace aura { 15 namespace aura {
15 class Window; 16 class Window;
16 class WindowDelegate; 17 class WindowDelegate;
17 namespace test { 18 namespace test {
(...skipping 21 matching lines...) Expand all
39 // A convenience function for dispatching an event to |dispatcher()|. 40 // A convenience function for dispatching an event to |dispatcher()|.
40 // Returns whether |event| was handled. 41 // Returns whether |event| was handled.
41 bool DispatchEventUsingWindowDispatcher(ui::Event* event); 42 bool DispatchEventUsingWindowDispatcher(ui::Event* event);
42 43
43 Window* root_window() { return helper_->root_window(); } 44 Window* root_window() { return helper_->root_window(); }
44 WindowTreeHost* host() { return helper_->host(); } 45 WindowTreeHost* host() { return helper_->host(); }
45 ui::EventProcessor* event_processor() { return helper_->event_processor(); } 46 ui::EventProcessor* event_processor() { return helper_->event_processor(); }
46 TestScreen* test_screen() { return helper_->test_screen(); } 47 TestScreen* test_screen() { return helper_->test_screen(); }
47 48
48 private: 49 private:
50 base::ShadowingAtExitManager at_exit_;
49 bool setup_called_; 51 bool setup_called_;
50 bool teardown_called_; 52 bool teardown_called_;
51 base::MessageLoopForUI message_loop_; 53 base::MessageLoopForUI message_loop_;
52 scoped_ptr<AuraTestHelper> helper_; 54 scoped_ptr<AuraTestHelper> helper_;
53 55
54 DISALLOW_COPY_AND_ASSIGN(AuraTestBase); 56 DISALLOW_COPY_AND_ASSIGN(AuraTestBase);
55 }; 57 };
56 58
57 } // namespace test 59 } // namespace test
58 } // namespace aura 60 } // namespace aura
59 61
60 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_ 62 #endif // UI_AURA_TEST_AURA_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698