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

Side by Side Diff: ui/views/view.h

Issue 2500623002: Add ViewObserver to View for view updates (Closed)
Patch Set: sadruls comments Created 4 years, 1 month 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
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_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 class TextInputClient; 63 class TextInputClient;
64 class Texture; 64 class Texture;
65 class ThemeProvider; 65 class ThemeProvider;
66 } 66 }
67 67
68 namespace views { 68 namespace views {
69 69
70 class Background; 70 class Background;
71 class Border; 71 class Border;
72 class ContextMenuController; 72 class ContextMenuController;
73 class DevToolsObserver;
73 class DragController; 74 class DragController;
74 class FocusManager; 75 class FocusManager;
75 class FocusTraversable; 76 class FocusTraversable;
76 class LayoutManager; 77 class LayoutManager;
77 class NativeViewAccessibility; 78 class NativeViewAccessibility;
78 class ScrollView; 79 class ScrollView;
79 class Widget; 80 class Widget;
80 class WordLookupClient; 81 class WordLookupClient;
81 82
82 namespace internal { 83 namespace internal {
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 // to scroll. ScrollView interprets a return value of 0 (or negative) 996 // to scroll. ScrollView interprets a return value of 0 (or negative)
996 // to scroll by a default amount. 997 // to scroll by a default amount.
997 // 998 //
998 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for 999 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for
999 // implementations of common cases. 1000 // implementations of common cases.
1000 virtual int GetPageScrollIncrement(ScrollView* scroll_view, 1001 virtual int GetPageScrollIncrement(ScrollView* scroll_view,
1001 bool is_horizontal, bool is_positive); 1002 bool is_horizontal, bool is_positive);
1002 virtual int GetLineScrollIncrement(ScrollView* scroll_view, 1003 virtual int GetLineScrollIncrement(ScrollView* scroll_view,
1003 bool is_horizontal, bool is_positive); 1004 bool is_horizontal, bool is_positive);
1004 1005
1006 // DevTools Observer ---------------------------------------------------------
1007
1008 void set_devtools_observer(DevToolsObserver* devtools_observer) {
1009 devtools_observer_ = devtools_observer;
1010 };
1011
1005 protected: 1012 protected:
1006 // Used to track a drag. RootView passes this into 1013 // Used to track a drag. RootView passes this into
1007 // ProcessMousePressed/Dragged. 1014 // ProcessMousePressed/Dragged.
1008 struct DragInfo { 1015 struct DragInfo {
1009 // Sets possible_drag to false and start_x/y to 0. This is invoked by 1016 // Sets possible_drag to false and start_x/y to 0. This is invoked by
1010 // RootView prior to invoke ProcessMousePressed. 1017 // RootView prior to invoke ProcessMousePressed.
1011 void Reset(); 1018 void Reset();
1012 1019
1013 // Sets possible_drag to true and start_pt to the specified point. 1020 // Sets possible_drag to true and start_pt to the specified point.
1014 // This is invoked by the target view if it detects the press may generate 1021 // This is invoked by the target view if it detects the press may generate
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 // Input -------------------------------------------------------------------- 1577 // Input --------------------------------------------------------------------
1571 1578
1572 std::unique_ptr<ViewTargeter> targeter_; 1579 std::unique_ptr<ViewTargeter> targeter_;
1573 1580
1574 // Accessibility ------------------------------------------------------------- 1581 // Accessibility -------------------------------------------------------------
1575 1582
1576 // Belongs to this view, but it's reference-counted on some platforms 1583 // Belongs to this view, but it's reference-counted on some platforms
1577 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1584 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1578 NativeViewAccessibility* native_view_accessibility_; 1585 NativeViewAccessibility* native_view_accessibility_;
1579 1586
1587 // Observers -------------------------------------------------------------
1588
1589 DevToolsObserver* devtools_observer_;
1590
1580 DISALLOW_COPY_AND_ASSIGN(View); 1591 DISALLOW_COPY_AND_ASSIGN(View);
1581 }; 1592 };
1582 1593
1583 } // namespace views 1594 } // namespace views
1584 1595
1585 #endif // UI_VIEWS_VIEW_H_ 1596 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/devtools_observer.h ('k') | ui/views/view.cc » ('j') | ui/views/view_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698