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

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

Issue 10448102: Adds switch to disable generating mouse events from touch events and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove released and fix bug in GestureRecognizerImpl Created 8 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
« no previous file with comments | « ui/aura/aura_switches.cc ('k') | ui/aura/env.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_AURA_ENV_H_ 5 #ifndef UI_AURA_ENV_H_
6 #define UI_AURA_ENV_H_ 6 #define UI_AURA_ENV_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 27 matching lines...) Expand all
38 static void DeleteInstance(); 38 static void DeleteInstance();
39 39
40 void AddObserver(EnvObserver* observer); 40 void AddObserver(EnvObserver* observer);
41 void RemoveObserver(EnvObserver* observer); 41 void RemoveObserver(EnvObserver* observer);
42 42
43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } 43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; }
44 void set_mouse_button_flags(int mouse_button_flags) { 44 void set_mouse_button_flags(int mouse_button_flags) {
45 mouse_button_flags_ = mouse_button_flags; 45 mouse_button_flags_ = mouse_button_flags;
46 } 46 }
47 47
48 // Whether any touch device is currently down.
49 bool is_touch_down() const { return is_touch_down_; }
50 void set_touch_down(bool value) { is_touch_down_ = value; }
51
48 client::StackingClient* stacking_client() { return stacking_client_; } 52 client::StackingClient* stacking_client() { return stacking_client_; }
49 void set_stacking_client(client::StackingClient* stacking_client) { 53 void set_stacking_client(client::StackingClient* stacking_client) {
50 stacking_client_ = stacking_client; 54 stacking_client_ = stacking_client;
51 } 55 }
52 56
53 // Gets/sets MonitorManager. The MonitorManager's ownership is 57 // Gets/sets MonitorManager. The MonitorManager's ownership is
54 // transfered. 58 // transfered.
55 MonitorManager* monitor_manager() { return monitor_manager_.get(); } 59 MonitorManager* monitor_manager() { return monitor_manager_.get(); }
56 void SetMonitorManager(MonitorManager* monitor_manager); 60 void SetMonitorManager(MonitorManager* monitor_manager);
57 61
(...skipping 13 matching lines...) Expand all
71 // Called by the Window when it is initialized. Notifies observers. 75 // Called by the Window when it is initialized. Notifies observers.
72 void NotifyWindowInitialized(Window* window); 76 void NotifyWindowInitialized(Window* window);
73 77
74 ObserverList<EnvObserver> observers_; 78 ObserverList<EnvObserver> observers_;
75 #if !defined(OS_MACOSX) 79 #if !defined(OS_MACOSX)
76 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; 80 scoped_ptr<MessageLoop::Dispatcher> dispatcher_;
77 #endif 81 #endif
78 82
79 static Env* instance_; 83 static Env* instance_;
80 int mouse_button_flags_; 84 int mouse_button_flags_;
85 bool is_touch_down_;
81 client::StackingClient* stacking_client_; 86 client::StackingClient* stacking_client_;
82 scoped_ptr<MonitorManager> monitor_manager_; 87 scoped_ptr<MonitorManager> monitor_manager_;
83 88
84 #if defined(USE_X11) 89 #if defined(USE_X11)
85 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; 90 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_;
86 #endif 91 #endif
87 92
88 DISALLOW_COPY_AND_ASSIGN(Env); 93 DISALLOW_COPY_AND_ASSIGN(Env);
89 }; 94 };
90 95
91 } // namespace aura 96 } // namespace aura
92 97
93 #endif // UI_AURA_ENV_H_ 98 #endif // UI_AURA_ENV_H_
OLDNEW
« no previous file with comments | « ui/aura/aura_switches.cc ('k') | ui/aura/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698