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

Side by Side Diff: views/view.h

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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) 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 <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // LayoutManager interface can be used to lay out children if required. 91 // LayoutManager interface can be used to lay out children if required.
92 // 92 //
93 // It is up to the subclass to implement Painting and storage of subclass - 93 // It is up to the subclass to implement Painting and storage of subclass -
94 // specific properties and functionality. 94 // specific properties and functionality.
95 // 95 //
96 // Unless otherwise documented, views is not thread safe and should only be 96 // Unless otherwise documented, views is not thread safe and should only be
97 // accessed from the main thread. 97 // accessed from the main thread.
98 // 98 //
99 ///////////////////////////////////////////////////////////////////////////// 99 /////////////////////////////////////////////////////////////////////////////
100 class VIEWS_EXPORT View : public ui::LayerDelegate, 100 class VIEWS_EXPORT View : public ui::LayerDelegate,
101 public AcceleratorTarget { 101 public ui::AcceleratorTarget {
102 public: 102 public:
103 typedef std::vector<View*> Views; 103 typedef std::vector<View*> Views;
104 104
105 // TO BE MOVED --------------------------------------------------------------- 105 // TO BE MOVED ---------------------------------------------------------------
106 // TODO(beng): These methods are to be moved to other files/classes. 106 // TODO(beng): These methods are to be moved to other files/classes.
107 107
108 // TODO(beng): delete 108 // TODO(beng): delete
109 // Set whether this view is hottracked. A disabled view cannot be hottracked. 109 // Set whether this view is hottracked. A disabled view cannot be hottracked.
110 // If flag differs from the current value, SchedulePaint is invoked. 110 // If flag differs from the current value, SchedulePaint is invoked.
111 virtual void SetHotTracked(bool flag); 111 virtual void SetHotTracked(bool flag);
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 // method several times. 638 // method several times.
639 virtual void AddAccelerator(const Accelerator& accelerator); 639 virtual void AddAccelerator(const Accelerator& accelerator);
640 640
641 // Removes the specified accelerator for this view. 641 // Removes the specified accelerator for this view.
642 virtual void RemoveAccelerator(const Accelerator& accelerator); 642 virtual void RemoveAccelerator(const Accelerator& accelerator);
643 643
644 // Removes all the keyboard accelerators for this view. 644 // Removes all the keyboard accelerators for this view.
645 virtual void ResetAccelerators(); 645 virtual void ResetAccelerators();
646 646
647 // Overridden from AcceleratorTarget: 647 // Overridden from AcceleratorTarget:
648 virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE; 648 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
649 649
650 // Focus --------------------------------------------------------------------- 650 // Focus ---------------------------------------------------------------------
651 651
652 // Returns whether this view currently has the focus. 652 // Returns whether this view currently has the focus.
653 virtual bool HasFocus() const; 653 virtual bool HasFocus() const;
654 654
655 // Returns the view that should be selected next when pressing Tab. 655 // Returns the view that should be selected next when pressing Tab.
656 View* GetNextFocusableView(); 656 View* GetNextFocusableView();
657 const View* GetNextFocusableView() const; 657 const View* GetNextFocusableView() const;
658 658
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1444 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1445 native_view_accessibility_win_; 1445 native_view_accessibility_win_;
1446 #endif 1446 #endif
1447 1447
1448 DISALLOW_COPY_AND_ASSIGN(View); 1448 DISALLOW_COPY_AND_ASSIGN(View);
1449 }; 1449 };
1450 1450
1451 } // namespace views 1451 } // namespace views
1452 1452
1453 #endif // VIEWS_VIEW_H_ 1453 #endif // VIEWS_VIEW_H_
OLDNEW
« views/accelerator.h ('K') | « views/focus/focus_manager_unittest.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698