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

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

Issue 284233009: Adds ViewsDelegate::GetContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more spaces Created 6 years, 7 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
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | ui/views/test/test_views_delegate.cc » ('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 (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_TEST_VIEWS_DELEGATE_H_ 5 #ifndef UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ 6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/views/views_delegate.h" 9 #include "ui/views/views_delegate.h"
10 10
(...skipping 12 matching lines...) Expand all
23 // DesktopNativeWidgetAura instead of whatever the default native widget would 23 // DesktopNativeWidgetAura instead of whatever the default native widget would
24 // be. This has no effect on ChromeOS. 24 // be. This has no effect on ChromeOS.
25 void set_use_desktop_native_widgets(bool desktop) { 25 void set_use_desktop_native_widgets(bool desktop) {
26 use_desktop_native_widgets_ = desktop; 26 use_desktop_native_widgets_ = desktop;
27 } 27 }
28 28
29 void set_use_transparent_windows(bool transparent) { 29 void set_use_transparent_windows(bool transparent) {
30 use_transparent_windows_ = transparent; 30 use_transparent_windows_ = transparent;
31 } 31 }
32 32
33 #if defined(USE_AURA)
34 void set_context_factory(ui::ContextFactory* context_factory) {
35 context_factory_ = context_factory;
36 }
37 #endif
38
33 // ViewsDelegate: 39 // ViewsDelegate:
34 virtual void OnBeforeWidgetInit( 40 virtual void OnBeforeWidgetInit(
35 Widget::InitParams* params, 41 Widget::InitParams* params,
36 internal::NativeWidgetDelegate* delegate) OVERRIDE; 42 internal::NativeWidgetDelegate* delegate) OVERRIDE;
43 #if defined(USE_AURA)
44 virtual ui::ContextFactory* GetContextFactory() OVERRIDE;
45 #endif
37 46
38 private: 47 private:
39 bool use_desktop_native_widgets_; 48 bool use_desktop_native_widgets_;
49
40 bool use_transparent_windows_; 50 bool use_transparent_windows_;
51
41 #if defined(USE_AURA) 52 #if defined(USE_AURA)
42 scoped_ptr<wm::WMState> wm_state_; 53 scoped_ptr<wm::WMState> wm_state_;
54
55 ui::ContextFactory* context_factory_;
43 #endif 56 #endif
44 57
45 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); 58 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate);
46 }; 59 };
47 60
48 } // namespace views 61 } // namespace views
49 62
50 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ 63 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | ui/views/test/test_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698