OLD | NEW |
---|---|
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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1424 | 1424 |
1425 // Starts a drag and drop operation originating from this view. This invokes | 1425 // Starts a drag and drop operation originating from this view. This invokes |
1426 // WriteDragData to write the data and GetDragOperations to determine the | 1426 // WriteDragData to write the data and GetDragOperations to determine the |
1427 // supported drag operations. When done, OnDragDone is invoked. |press_pt| is | 1427 // supported drag operations. When done, OnDragDone is invoked. |press_pt| is |
1428 // in the view's coordinate system. | 1428 // in the view's coordinate system. |
1429 // Returns true if a drag was started. | 1429 // Returns true if a drag was started. |
1430 bool DoDrag(const ui::LocatedEvent& event, | 1430 bool DoDrag(const ui::LocatedEvent& event, |
1431 const gfx::Point& press_pt, | 1431 const gfx::Point& press_pt, |
1432 ui::DragDropTypes::DragEventSource source); | 1432 ui::DragDropTypes::DragEventSource source); |
1433 | 1433 |
1434 // Returns true if this is not a top level widget. Virtual for tests. | |
1435 virtual bool IsChildWidget() const; | |
1436 // Returns true if the focus is not in a top level widget. Virtual for tests. | |
1437 virtual bool FocusInChildWidget() const; | |
sadrul
2016/01/28 08:11:00
These should not be virtual methods. It should be
meacer
2016/01/29 00:37:36
Done.
| |
1438 | |
1434 ////////////////////////////////////////////////////////////////////////////// | 1439 ////////////////////////////////////////////////////////////////////////////// |
1435 | 1440 |
1436 // Creation and lifetime ----------------------------------------------------- | 1441 // Creation and lifetime ----------------------------------------------------- |
1437 | 1442 |
1438 // False if this View is owned by its parent - i.e. it will be deleted by its | 1443 // False if this View is owned by its parent - i.e. it will be deleted by its |
1439 // parent during its parents destruction. False is the default. | 1444 // parent during its parents destruction. False is the default. |
1440 bool owned_by_client_; | 1445 bool owned_by_client_; |
1441 | 1446 |
1442 // Attributes ---------------------------------------------------------------- | 1447 // Attributes ---------------------------------------------------------------- |
1443 | 1448 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1574 // Belongs to this view, but it's reference-counted on some platforms | 1579 // Belongs to this view, but it's reference-counted on some platforms |
1575 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1580 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1576 NativeViewAccessibility* native_view_accessibility_; | 1581 NativeViewAccessibility* native_view_accessibility_; |
1577 | 1582 |
1578 DISALLOW_COPY_AND_ASSIGN(View); | 1583 DISALLOW_COPY_AND_ASSIGN(View); |
1579 }; | 1584 }; |
1580 | 1585 |
1581 } // namespace views | 1586 } // namespace views |
1582 | 1587 |
1583 #endif // UI_VIEWS_VIEW_H_ | 1588 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |