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

Side by Side Diff: views/widget/root_view.h

Issue 6347002: touch: Return an enum from OnTouchEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_WIDGET_ROOT_VIEW_H_ 5 #ifndef VIEWS_WIDGET_ROOT_VIEW_H_
6 #define VIEWS_WIDGET_ROOT_VIEW_H_ 6 #define VIEWS_WIDGET_ROOT_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 // 32 //
33 // The RootView is the root of a View hierarchy. A RootView is always the 33 // The RootView is the root of a View hierarchy. A RootView is always the
34 // first and only child of a Widget. 34 // first and only child of a Widget.
35 // 35 //
36 // The RootView manages the View hierarchy's interface with the Widget 36 // The RootView manages the View hierarchy's interface with the Widget
37 // and also maintains the current invalid rect - the region that needs 37 // and also maintains the current invalid rect - the region that needs
38 // repainting. 38 // repainting.
39 // 39 //
40 ///////////////////////////////////////////////////////////////////////////// 40 /////////////////////////////////////////////////////////////////////////////
41 class RootView : public View, 41 class RootView : public View,
42 #if defined(TOUCH_UI)
43 public TouchEventObserver,
44 #endif
42 public FocusTraversable { 45 public FocusTraversable {
43 public: 46 public:
44 static const char kViewClassName[]; 47 static const char kViewClassName[];
45 48
46 explicit RootView(Widget* widget); 49 explicit RootView(Widget* widget);
47 50
48 virtual ~RootView(); 51 virtual ~RootView();
49 52
50 // Sets the "contents view" of the RootView. This is the single child view 53 // Sets the "contents view" of the RootView. This is the single child view
51 // that is responsible for laying out the contents of the widget. 54 // that is responsible for laying out the contents of the widget.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 184
182 // Accessibility accessors/mutators, overridden from View. 185 // Accessibility accessors/mutators, overridden from View.
183 virtual AccessibilityTypes::Role GetAccessibleRole(); 186 virtual AccessibilityTypes::Role GetAccessibleRole();
184 187
185 #if defined(TOUCH_UI) && defined(UNIT_TEST) 188 #if defined(TOUCH_UI) && defined(UNIT_TEST)
186 // For unit testing purposes, we use this method to set a mock 189 // For unit testing purposes, we use this method to set a mock
187 // GestureManager 190 // GestureManager
188 void SetGestureManager(GestureManager* g) { gesture_manager_ = g; } 191 void SetGestureManager(GestureManager* g) { gesture_manager_ = g; }
189 #endif 192 #endif
190 193
194 #if defined(TOUCH_UI)
195 // Overridden from TouchEventObserver.
196 virtual void OnTouchSequenceEnd();
197 #endif
198
191 protected: 199 protected:
192 200
193 // Overridden to properly reset our event propagation member 201 // Overridden to properly reset our event propagation member
194 // variables when a child is removed 202 // variables when a child is removed
195 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); 203 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
196 204
197 #ifndef NDEBUG 205 #ifndef NDEBUG
198 virtual bool IsProcessingPaint() const { return is_processing_paint_; } 206 virtual bool IsProcessingPaint() const { return is_processing_paint_; }
199 #endif 207 #endif
200 208
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 358
351 #ifndef NDEBUG 359 #ifndef NDEBUG
352 // True if we're currently processing paint. 360 // True if we're currently processing paint.
353 bool is_processing_paint_; 361 bool is_processing_paint_;
354 #endif 362 #endif
355 DISALLOW_COPY_AND_ASSIGN(RootView); 363 DISALLOW_COPY_AND_ASSIGN(RootView);
356 }; 364 };
357 } // namespace views 365 } // namespace views
358 366
359 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ 367 #endif // VIEWS_WIDGET_ROOT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698