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 <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 28 matching lines...) Expand all Loading... |
39 class Canvas; | 39 class Canvas; |
40 class Insets; | 40 class Insets; |
41 class Path; | 41 class Path; |
42 class Transform; | 42 class Transform; |
43 } | 43 } |
44 | 44 |
45 namespace ui { | 45 namespace ui { |
46 struct AccessibleViewState; | 46 struct AccessibleViewState; |
47 class Compositor; | 47 class Compositor; |
48 class Layer; | 48 class Layer; |
| 49 class NativeTheme; |
49 class TextInputClient; | 50 class TextInputClient; |
50 class Texture; | 51 class Texture; |
51 class ThemeProvider; | 52 class ThemeProvider; |
52 } | 53 } |
53 | 54 |
54 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
55 class __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) | 56 class __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) |
56 NativeViewAccessibilityWin; | 57 NativeViewAccessibilityWin; |
57 #endif | 58 #endif |
58 | 59 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 Border* border() { return border_.get(); } | 465 Border* border() { return border_.get(); } |
465 | 466 |
466 // The focus_border object is owned by this object and may be NULL. | 467 // The focus_border object is owned by this object and may be NULL. |
467 void set_focus_border(FocusBorder* b) { focus_border_.reset(b); } | 468 void set_focus_border(FocusBorder* b) { focus_border_.reset(b); } |
468 const FocusBorder* focus_border() const { return focus_border_.get(); } | 469 const FocusBorder* focus_border() const { return focus_border_.get(); } |
469 FocusBorder* focus_border() { return focus_border_.get(); } | 470 FocusBorder* focus_border() { return focus_border_.get(); } |
470 | 471 |
471 // Get the theme provider from the parent widget. | 472 // Get the theme provider from the parent widget. |
472 virtual ui::ThemeProvider* GetThemeProvider() const; | 473 virtual ui::ThemeProvider* GetThemeProvider() const; |
473 | 474 |
| 475 // Returns the NativeTheme to use for this View. This calls through to |
| 476 // GetNativeTheme() on the Widget this View is in. If this View is not in a |
| 477 // Widget this returns NULL. |
| 478 ui::NativeTheme* GetNativeTheme(); |
| 479 |
474 // RTL painting -------------------------------------------------------------- | 480 // RTL painting -------------------------------------------------------------- |
475 | 481 |
476 // This method determines whether the gfx::Canvas object passed to | 482 // This method determines whether the gfx::Canvas object passed to |
477 // View::Paint() needs to be transformed such that anything drawn on the | 483 // View::Paint() needs to be transformed such that anything drawn on the |
478 // canvas object during View::Paint() is flipped horizontally. | 484 // canvas object during View::Paint() is flipped horizontally. |
479 // | 485 // |
480 // By default, this function returns false (which is the initial value of | 486 // By default, this function returns false (which is the initial value of |
481 // |flip_canvas_on_paint_for_rtl_ui_|). View subclasses that need to paint on | 487 // |flip_canvas_on_paint_for_rtl_ui_|). View subclasses that need to paint on |
482 // a flipped gfx::Canvas when the UI layout is right-to-left need to call | 488 // a flipped gfx::Canvas when the UI layout is right-to-left need to call |
483 // EnableCanvasFlippingForRTLUI(). | 489 // EnableCanvasFlippingForRTLUI(). |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1478 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
1473 native_view_accessibility_win_; | 1479 native_view_accessibility_win_; |
1474 #endif | 1480 #endif |
1475 | 1481 |
1476 DISALLOW_COPY_AND_ASSIGN(View); | 1482 DISALLOW_COPY_AND_ASSIGN(View); |
1477 }; | 1483 }; |
1478 | 1484 |
1479 } // namespace views | 1485 } // namespace views |
1480 | 1486 |
1481 #endif // UI_VIEWS_VIEW_H_ | 1487 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |