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

Side by Side Diff: views/view.h

Issue 6507028: Remove usages of RootView from View by moving relevant RootView API methods t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « views/controls/menu/menu_controller.cc ('k') | views/view.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_VIEW_H_ 5 #ifndef VIEWS_VIEW_H_
6 #define VIEWS_VIEW_H_ 6 #define VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 virtual int OnDragUpdated(const DropTargetEvent& event); 878 virtual int OnDragUpdated(const DropTargetEvent& event);
879 879
880 // Invoked during a drag and drop session when the mouse exits the views, or 880 // Invoked during a drag and drop session when the mouse exits the views, or
881 // when the drag session was canceled and the mouse was over the view. 881 // when the drag session was canceled and the mouse was over the view.
882 virtual void OnDragExited(); 882 virtual void OnDragExited();
883 883
884 // Invoked during a drag and drop session when OnDragUpdated returns a valid 884 // Invoked during a drag and drop session when OnDragUpdated returns a valid
885 // operation and the user release the mouse. 885 // operation and the user release the mouse.
886 virtual int OnPerformDrop(const DropTargetEvent& event); 886 virtual int OnPerformDrop(const DropTargetEvent& event);
887 887
888 // Invoked from DoDrag after the drag completes. This implementation does
889 // nothing, and is intended for subclasses to do cleanup.
890 virtual void OnDragDone();
891
888 // Returns true if the mouse was dragged enough to start a drag operation. 892 // Returns true if the mouse was dragged enough to start a drag operation.
889 // delta_x and y are the distance the mouse was dragged. 893 // delta_x and y are the distance the mouse was dragged.
890 static bool ExceededDragThreshold(int delta_x, int delta_y); 894 static bool ExceededDragThreshold(int delta_x, int delta_y);
891 895
892 // Accessibility ------------------------------------------------------------- 896 // Accessibility -------------------------------------------------------------
893 // TODO(ctguil): Move all this out to a AccessibleInfo wrapper class. 897 // TODO(ctguil): Move all this out to a AccessibleInfo wrapper class.
894 898
895 // Notify the platform specific accessibility client of changes in the user 899 // Notify the platform specific accessibility client of changes in the user
896 // interface. This will always raise native notifications. 900 // interface. This will always raise native notifications.
897 virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type); 901 virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 1146
1143 // Drag and drop ------------------------------------------------------------- 1147 // Drag and drop -------------------------------------------------------------
1144 1148
1145 // These are cover methods that invoke the method of the same name on 1149 // These are cover methods that invoke the method of the same name on
1146 // the DragController. Subclasses may wish to override rather than install 1150 // the DragController. Subclasses may wish to override rather than install
1147 // a DragController. 1151 // a DragController.
1148 // See DragController for a description of these methods. 1152 // See DragController for a description of these methods.
1149 virtual int GetDragOperations(const gfx::Point& press_pt); 1153 virtual int GetDragOperations(const gfx::Point& press_pt);
1150 virtual void WriteDragData(const gfx::Point& press_pt, OSExchangeData* data); 1154 virtual void WriteDragData(const gfx::Point& press_pt, OSExchangeData* data);
1151 1155
1152 // Invoked from DoDrag after the drag completes. This implementation does
1153 // nothing, and is intended for subclasses to do cleanup.
1154 virtual void OnDragDone();
1155
1156 // Returns whether we're in the middle of a drag session that was initiated 1156 // Returns whether we're in the middle of a drag session that was initiated
1157 // by us. 1157 // by us.
1158 bool InDrag(); 1158 bool InDrag();
1159 1159
1160 // Returns how much the mouse needs to move in one direction to start a 1160 // Returns how much the mouse needs to move in one direction to start a
1161 // drag. These methods cache in a platform-appropriate way. These values are 1161 // drag. These methods cache in a platform-appropriate way. These values are
1162 // used by the public static method ExceededDragThreshold(). 1162 // used by the public static method ExceededDragThreshold().
1163 static int GetHorizontalDragThreshold(); 1163 static int GetHorizontalDragThreshold();
1164 static int GetVerticalDragThreshold(); 1164 static int GetVerticalDragThreshold();
1165 1165
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 // The accessibility implementation for this View. 1433 // The accessibility implementation for this View.
1434 scoped_refptr<ViewAccessibility> view_accessibility_; 1434 scoped_refptr<ViewAccessibility> view_accessibility_;
1435 #endif 1435 #endif
1436 1436
1437 DISALLOW_COPY_AND_ASSIGN(View); 1437 DISALLOW_COPY_AND_ASSIGN(View);
1438 }; 1438 };
1439 1439
1440 } // namespace views 1440 } // namespace views
1441 1441
1442 #endif // VIEWS_VIEW_H_ 1442 #endif // VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_controller.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698