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

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

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 // The border object is owned by this object and may be NULL. 507 // The border object is owned by this object and may be NULL.
508 virtual void SetBorder(scoped_ptr<Border> b); 508 virtual void SetBorder(scoped_ptr<Border> b);
509 const Border* border() const { return border_.get(); } 509 const Border* border() const { return border_.get(); }
510 Border* border() { return border_.get(); } 510 Border* border() { return border_.get(); }
511 511
512 // Get the theme provider from the parent widget. 512 // Get the theme provider from the parent widget.
513 ui::ThemeProvider* GetThemeProvider() const; 513 ui::ThemeProvider* GetThemeProvider() const;
514 514
515 // Returns the NativeTheme to use for this View. This calls through to 515 // Returns the NativeTheme to use for this View. This calls through to
516 // GetNativeTheme() on the Widget this View is in. If this View is not in a 516 // GetNativeTheme() on the Widget this View is in, or provides a default
517 // Widget this returns ui::NativeTheme::instance(). 517 // theme if there's no widget. Warning: the default theme might not be
518 // correct; you should probably override OnNativeThemeChanged().
518 ui::NativeTheme* GetNativeTheme() { 519 ui::NativeTheme* GetNativeTheme() {
519 return const_cast<ui::NativeTheme*>( 520 return const_cast<ui::NativeTheme*>(
520 const_cast<const View*>(this)->GetNativeTheme()); 521 const_cast<const View*>(this)->GetNativeTheme());
521 } 522 }
522 const ui::NativeTheme* GetNativeTheme() const; 523 const ui::NativeTheme* GetNativeTheme() const;
523 524
524 // RTL painting -------------------------------------------------------------- 525 // RTL painting --------------------------------------------------------------
525 526
526 // This method determines whether the gfx::Canvas object passed to 527 // This method determines whether the gfx::Canvas object passed to
527 // View::Paint() needs to be transformed such that anything drawn on the 528 // View::Paint() needs to be transformed such that anything drawn on the
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 // Belongs to this view, but it's reference-counted on some platforms 1563 // Belongs to this view, but it's reference-counted on some platforms
1563 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1564 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1564 NativeViewAccessibility* native_view_accessibility_; 1565 NativeViewAccessibility* native_view_accessibility_;
1565 1566
1566 DISALLOW_COPY_AND_ASSIGN(View); 1567 DISALLOW_COPY_AND_ASSIGN(View);
1567 }; 1568 };
1568 1569
1569 } // namespace views 1570 } // namespace views
1570 1571
1571 #endif // UI_VIEWS_VIEW_H_ 1572 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698