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

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

Issue 2500623002: Add ViewObserver to View for view updates (Closed)
Patch Set: Add DevToolsobserver to View for view updates 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 SetDevToolsObserver(DevToolsObserver* devtools_observer);
sadrul 2016/11/15 17:21:49 set_devtools_observer and inline the impl in here
Sarmad Hashmi 2016/11/15 17:54:56 Done.
1009
1005 protected: 1010 protected:
1006 // Used to track a drag. RootView passes this into 1011 // Used to track a drag. RootView passes this into
1007 // ProcessMousePressed/Dragged. 1012 // ProcessMousePressed/Dragged.
1008 struct DragInfo { 1013 struct DragInfo {
1009 // Sets possible_drag to false and start_x/y to 0. This is invoked by 1014 // Sets possible_drag to false and start_x/y to 0. This is invoked by
1010 // RootView prior to invoke ProcessMousePressed. 1015 // RootView prior to invoke ProcessMousePressed.
1011 void Reset(); 1016 void Reset();
1012 1017
1013 // Sets possible_drag to true and start_pt to the specified point. 1018 // 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 1019 // 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 -------------------------------------------------------------------- 1575 // Input --------------------------------------------------------------------
1571 1576
1572 std::unique_ptr<ViewTargeter> targeter_; 1577 std::unique_ptr<ViewTargeter> targeter_;
1573 1578
1574 // Accessibility ------------------------------------------------------------- 1579 // Accessibility -------------------------------------------------------------
1575 1580
1576 // Belongs to this view, but it's reference-counted on some platforms 1581 // 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. 1582 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1578 NativeViewAccessibility* native_view_accessibility_; 1583 NativeViewAccessibility* native_view_accessibility_;
1579 1584
1585 // Observers -------------------------------------------------------------
1586
1587 DevToolsObserver* devtools_observer_;
1588
1580 DISALLOW_COPY_AND_ASSIGN(View); 1589 DISALLOW_COPY_AND_ASSIGN(View);
1581 }; 1590 };
1582 1591
1583 } // namespace views 1592 } // namespace views
1584 1593
1585 #endif // UI_VIEWS_VIEW_H_ 1594 #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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698