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

Side by Side Diff: ui/views/test/test_views_delegate_aura.cc

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years 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
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/test/test_views_delegate_mac.mm » ('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 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/test/test_views_delegate.h" 5 #include "ui/views/test/test_views_delegate.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 9
10 #if !defined(OS_CHROMEOS) 10 #if !defined(OS_CHROMEOS)
11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
12 #endif // !defined(OS_CHROMEOS) 12 #endif // !defined(OS_CHROMEOS)
13 13
14 14
15 namespace views { 15 namespace views {
16 16
17 TestViewsDelegate::TestViewsDelegate() 17 TestViewsDelegate::TestViewsDelegate()
18 : context_factory_(nullptr), 18 : context_factory_(nullptr),
19 context_factory_private_(nullptr),
19 use_desktop_native_widgets_(false), 20 use_desktop_native_widgets_(false),
20 use_transparent_windows_(false) { 21 use_transparent_windows_(false) {}
21 }
22 22
23 TestViewsDelegate::~TestViewsDelegate() { 23 TestViewsDelegate::~TestViewsDelegate() {
24 } 24 }
25 25
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 HICON TestViewsDelegate::GetSmallWindowIcon() const { 27 HICON TestViewsDelegate::GetSmallWindowIcon() const {
28 return nullptr; 28 return nullptr;
29 } 29 }
30 #endif 30 #endif
31 31
(...skipping 12 matching lines...) Expand all
44 } 44 }
45 45
46 ui::ContextFactory* TestViewsDelegate::GetContextFactory() { 46 ui::ContextFactory* TestViewsDelegate::GetContextFactory() {
47 if (context_factory_) 47 if (context_factory_)
48 return context_factory_; 48 return context_factory_;
49 if (aura::Env::GetInstance()) 49 if (aura::Env::GetInstance())
50 return aura::Env::GetInstance()->context_factory(); 50 return aura::Env::GetInstance()->context_factory();
51 return nullptr; 51 return nullptr;
52 } 52 }
53 53
54 ui::ContextFactoryPrivate* TestViewsDelegate::GetContextFactoryPrivate() {
55 if (context_factory_private_)
56 return context_factory_private_;
57 if (aura::Env::GetInstance())
58 return aura::Env::GetInstance()->context_factory_private();
59 return nullptr;
60 }
61
54 } // namespace views 62 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/test/test_views_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698