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

Side by Side Diff: ui/aura/env.cc

Issue 296053009: Makes Env contain a ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo 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 | « ui/aura/env.h ('k') | ui/aura/test/aura_test_base.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 #include "ui/aura/env.h" 5 #include "ui/aura/env.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/threading/thread_local.h" 8 #include "base/threading/thread_local.h"
9 #include "ui/aura/env_observer.h" 9 #include "ui/aura/env_observer.h"
10 #include "ui/aura/input_state_lookup.h" 10 #include "ui/aura/input_state_lookup.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return input_state_lookup_.get() ? input_state_lookup_->IsMouseButtonDown() : 59 return input_state_lookup_.get() ? input_state_lookup_->IsMouseButtonDown() :
60 mouse_button_flags_ != 0; 60 mouse_button_flags_ != 0;
61 } 61 }
62 62
63 //////////////////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////////////////
64 // Env, private: 64 // Env, private:
65 65
66 Env::Env() 66 Env::Env()
67 : mouse_button_flags_(0), 67 : mouse_button_flags_(0),
68 is_touch_down_(false), 68 is_touch_down_(false),
69 input_state_lookup_(InputStateLookup::Create().Pass()) { 69 input_state_lookup_(InputStateLookup::Create().Pass()),
70 context_factory_(NULL) {
70 DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL); 71 DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL);
71 lazy_tls_ptr.Pointer()->Set(this); 72 lazy_tls_ptr.Pointer()->Set(this);
72 } 73 }
73 74
74 Env::~Env() { 75 Env::~Env() {
75 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWillDestroyEnv()); 76 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWillDestroyEnv());
76 DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get()); 77 DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get());
77 lazy_tls_ptr.Pointer()->Set(NULL); 78 lazy_tls_ptr.Pointer()->Set(NULL);
78 } 79 }
79 80
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const { 114 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const {
114 return scoped_ptr<ui::EventTargetIterator>(); 115 return scoped_ptr<ui::EventTargetIterator>();
115 } 116 }
116 117
117 ui::EventTargeter* Env::GetEventTargeter() { 118 ui::EventTargeter* Env::GetEventTargeter() {
118 NOTREACHED(); 119 NOTREACHED();
119 return NULL; 120 return NULL;
120 } 121 }
121 122
122 } // namespace aura 123 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/env.h ('k') | ui/aura/test/aura_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698