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

Side by Side Diff: ui/views/test/views_test_base.h

Issue 387993004: MacViews: Change Widget context type to NativeWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_VIEWS_TEST_VIEWS_TEST_BASE_H_ 5 #ifndef UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 6 #define UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 29 matching lines...) Expand all
40 TestViewsDelegate& views_delegate() const { return *views_delegate_.get(); } 40 TestViewsDelegate& views_delegate() const { return *views_delegate_.get(); }
41 41
42 void set_views_delegate(TestViewsDelegate* views_delegate) { 42 void set_views_delegate(TestViewsDelegate* views_delegate) {
43 views_delegate_.reset(views_delegate); 43 views_delegate_.reset(views_delegate);
44 } 44 }
45 45
46 base::MessageLoopForUI* message_loop() { return &message_loop_; } 46 base::MessageLoopForUI* message_loop() { return &message_loop_; }
47 47
48 // Returns a context view. In aura builds, this will be the 48 // Returns a context view. In aura builds, this will be the
49 // RootWindow. Everywhere else, NULL. 49 // RootWindow. Everywhere else, NULL.
50 gfx::NativeView GetContext(); 50 gfx::NativeWindow GetContext();
51 51
52 private: 52 private:
53 base::MessageLoopForUI message_loop_; 53 base::MessageLoopForUI message_loop_;
54 scoped_ptr<TestViewsDelegate> views_delegate_; 54 scoped_ptr<TestViewsDelegate> views_delegate_;
55 scoped_ptr<ViewsTestHelper> test_helper_; 55 scoped_ptr<ViewsTestHelper> test_helper_;
56 bool setup_called_; 56 bool setup_called_;
57 bool teardown_called_; 57 bool teardown_called_;
58 58
59 #if defined(OS_WIN) 59 #if defined(OS_WIN)
60 ui::ScopedOleInitializer ole_initializer_; 60 ui::ScopedOleInitializer ole_initializer_;
61 #endif 61 #endif
62 62
63 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); 63 DISALLOW_COPY_AND_ASSIGN(ViewsTestBase);
64 }; 64 };
65 65
66 } // namespace views 66 } // namespace views
67 67
68 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_ 68 #endif // UI_VIEWS_TEST_VIEWS_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698