| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 const ui::ThemeProvider* GetThemeProvider() const; | 524 const ui::ThemeProvider* GetThemeProvider() const; |
| 525 | 525 |
| 526 // Returns the NativeTheme to use for this View. This calls through to | 526 // Returns the NativeTheme to use for this View. This calls through to |
| 527 // GetNativeTheme() on the Widget this View is in, or provides a default | 527 // GetNativeTheme() on the Widget this View is in, or provides a default |
| 528 // theme if there's no widget. Warning: the default theme might not be | 528 // theme if there's no widget. Warning: the default theme might not be |
| 529 // correct; you should probably override OnNativeThemeChanged(). | 529 // correct; you should probably override OnNativeThemeChanged(). |
| 530 ui::NativeTheme* GetNativeTheme() { | 530 ui::NativeTheme* GetNativeTheme() { |
| 531 return const_cast<ui::NativeTheme*>( | 531 return const_cast<ui::NativeTheme*>( |
| 532 const_cast<const View*>(this)->GetNativeTheme()); | 532 const_cast<const View*>(this)->GetNativeTheme()); |
| 533 } | 533 } |
| 534 const ui::NativeTheme* GetNativeTheme() const; | 534 virtual const ui::NativeTheme* GetNativeTheme() const; |
| 535 | 535 |
| 536 // RTL painting -------------------------------------------------------------- | 536 // RTL painting -------------------------------------------------------------- |
| 537 | 537 |
| 538 // This method determines whether the gfx::Canvas object passed to | 538 // This method determines whether the gfx::Canvas object passed to |
| 539 // View::Paint() needs to be transformed such that anything drawn on the | 539 // View::Paint() needs to be transformed such that anything drawn on the |
| 540 // canvas object during View::Paint() is flipped horizontally. | 540 // canvas object during View::Paint() is flipped horizontally. |
| 541 // | 541 // |
| 542 // By default, this function returns false (which is the initial value of | 542 // By default, this function returns false (which is the initial value of |
| 543 // |flip_canvas_on_paint_for_rtl_ui_|). View subclasses that need to paint on | 543 // |flip_canvas_on_paint_for_rtl_ui_|). View subclasses that need to paint on |
| 544 // a flipped gfx::Canvas when the UI layout is right-to-left need to call | 544 // a flipped gfx::Canvas when the UI layout is right-to-left need to call |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 // Belongs to this view, but it's reference-counted on some platforms | 1569 // Belongs to this view, but it's reference-counted on some platforms |
| 1570 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1570 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
| 1571 NativeViewAccessibility* native_view_accessibility_; | 1571 NativeViewAccessibility* native_view_accessibility_; |
| 1572 | 1572 |
| 1573 DISALLOW_COPY_AND_ASSIGN(View); | 1573 DISALLOW_COPY_AND_ASSIGN(View); |
| 1574 }; | 1574 }; |
| 1575 | 1575 |
| 1576 } // namespace views | 1576 } // namespace views |
| 1577 | 1577 |
| 1578 #endif // UI_VIEWS_VIEW_H_ | 1578 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |