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

Unified Diff: ash/touch/touch_observer_hud.h

Issue 14399005: Added projection mode to touch HUD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Used SkFloatToScalar to convert float to SkScalar (for win7_aura compile error) Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_observer_hud.h
diff --git a/ash/touch/touch_observer_hud.h b/ash/touch/touch_observer_hud.h
index 1a79015b8c911a6c66d95968f413b8d31a7988c4..1831b85465eee89a8d647a2edd8e0af08865dc40 100644
--- a/ash/touch/touch_observer_hud.h
+++ b/ash/touch/touch_observer_hud.h
@@ -8,6 +8,7 @@
#include "ash/ash_export.h"
#include "ash/display/display_controller.h"
#include "ash/shell.h"
+#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "ui/base/events/event_handler.h"
#include "ui/gfx/display_observer.h"
@@ -36,6 +37,7 @@ namespace ash {
namespace internal {
class TouchHudCanvas;
+class TouchLog;
// An event filter which handles system level gesture events. Objects of this
// class manage their own lifetime.
@@ -48,6 +50,13 @@ class ASH_EXPORT TouchObserverHUD
#endif // defined(OS_CHROMEOS)
public DisplayController::Observer {
public:
+ enum Mode {
+ FULLSCREEN,
+ REDUCED_SCALE,
+ PROJECTION,
+ INVISIBLE,
+ };
+
explicit TouchObserverHUD(aura::RootWindow* initial_root);
// Returns the log of touch events as a dictionary mapping id of each display
@@ -66,11 +75,15 @@ class ASH_EXPORT TouchObserverHUD
// trace of one touch point.
scoped_ptr<ListValue> GetLogAsList() const;
+ Mode mode() const { return mode_; }
+
private:
friend class TouchHudTest;
virtual ~TouchObserverHUD();
+ void SetMode(Mode mode);
+
void UpdateTouchPointLabel(int index);
// Overriden from ui::EventHandler:
@@ -98,13 +111,14 @@ class ASH_EXPORT TouchObserverHUD
const int64 display_id_;
aura::RootWindow* root_window_;
+ Mode mode_;
+
+ scoped_ptr<TouchLog> touch_log_;
+
views::Widget* widget_;
TouchHudCanvas* canvas_;
views::View* label_container_;
views::Label* touch_labels_[kMaxTouchPoints];
- gfx::Point touch_positions_[kMaxTouchPoints];
- float touch_radius_[kMaxTouchPoints];
- ui::EventType touch_status_[kMaxTouchPoints];
DISALLOW_COPY_AND_ASSIGN(TouchObserverHUD);
};
« no previous file with comments | « no previous file | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698