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

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

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further renaming Created 6 years, 11 months 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 | Annotate | Revision Log
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 // to paint itself via the various OnPaint*() event handlers and then paints 506 // to paint itself via the various OnPaint*() event handlers and then paints
507 // the hierarchy beneath it. 507 // the hierarchy beneath it.
508 virtual void Paint(gfx::Canvas* canvas); 508 virtual void Paint(gfx::Canvas* canvas);
509 509
510 // The background object is owned by this object and may be NULL. 510 // The background object is owned by this object and may be NULL.
511 void set_background(Background* b); 511 void set_background(Background* b);
512 const Background* background() const { return background_.get(); } 512 const Background* background() const { return background_.get(); }
513 Background* background() { return background_.get(); } 513 Background* background() { return background_.get(); }
514 514
515 // The border object is owned by this object and may be NULL. 515 // The border object is owned by this object and may be NULL.
516 void set_border(Border* b); 516 void SetBorder(scoped_ptr<Border> b);
517 void ClearBorder();
sky 2014/01/23 15:30:54 Why do we need ClearBorder? I get that it saves so
Elliot Glaysher 2014/01/23 18:55:26 Because it's really visually ugly and not clear at
sky 2014/01/23 19:39:36 That argument applies anywhere we take a scoped_pt
517 const Border* border() const { return border_.get(); } 518 const Border* border() const { return border_.get(); }
518 Border* border() { return border_.get(); } 519 Border* border() { return border_.get(); }
519 520
520 // Get the theme provider from the parent widget. 521 // Get the theme provider from the parent widget.
521 virtual ui::ThemeProvider* GetThemeProvider() const; 522 virtual ui::ThemeProvider* GetThemeProvider() const;
522 523
523 // Returns the NativeTheme to use for this View. This calls through to 524 // Returns the NativeTheme to use for this View. This calls through to
524 // GetNativeTheme() on the Widget this View is in. If this View is not in a 525 // GetNativeTheme() on the Widget this View is in. If this View is not in a
525 // Widget this returns ui::NativeTheme::instance(). 526 // Widget this returns ui::NativeTheme::instance().
526 ui::NativeTheme* GetNativeTheme() { 527 ui::NativeTheme* GetNativeTheme() {
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 // Belongs to this view, but it's reference-counted on some platforms 1561 // Belongs to this view, but it's reference-counted on some platforms
1561 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1562 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1562 NativeViewAccessibility* native_view_accessibility_; 1563 NativeViewAccessibility* native_view_accessibility_;
1563 1564
1564 DISALLOW_COPY_AND_ASSIGN(View); 1565 DISALLOW_COPY_AND_ASSIGN(View);
1565 }; 1566 };
1566 1567
1567 } // namespace views 1568 } // namespace views
1568 1569
1569 #endif // UI_VIEWS_VIEW_H_ 1570 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698