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

Side by Side Diff: chrome/browser/ui/views/dropdown_bar_view.cc

Issue 1513153002: Border::CreateBorderPainter now takes a unique_ptr, not a raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@border-unittest
Patch Set: Rebase (rest of border switched to unique_ptr). Created 4 years, 8 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
« no previous file with comments | « no previous file | ui/views/border.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/views/dropdown_bar_view.h" 5 #include "chrome/browser/ui/views/dropdown_bar_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
9 #include "chrome/browser/ui/view_ids.h" 10 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 11 #include "chrome/browser/ui/views/frame/browser_view.h"
11 #include "grit/theme_resources.h" 12 #include "grit/theme_resources.h"
12 #include "third_party/skia/include/core/SkCanvas.h" 13 #include "third_party/skia/include/core/SkCanvas.h"
13 #include "third_party/skia/include/core/SkRect.h" 14 #include "third_party/skia/include/core/SkRect.h"
14 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
16 #include "ui/gfx/image/image_skia.h" 17 #include "ui/gfx/image/image_skia.h"
17 #include "ui/views/background.h" 18 #include "ui/views/background.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 set_background(new DropdownBackground(host()->browser_view(), left_alpha_mask, 97 set_background(new DropdownBackground(host()->browser_view(), left_alpha_mask,
97 right_alpha_mask)); 98 right_alpha_mask));
98 } 99 }
99 100
100 void DropdownBarView::SetBorderFromIds(int left_border_image_id, 101 void DropdownBarView::SetBorderFromIds(int left_border_image_id,
101 int middle_border_image_id, 102 int middle_border_image_id,
102 int right_border_image_id) { 103 int right_border_image_id) {
103 int border_image_ids[3] = {left_border_image_id, middle_border_image_id, 104 int border_image_ids[3] = {left_border_image_id, middle_border_image_id,
104 right_border_image_id}; 105 right_border_image_id};
105 SetBorder(views::Border::CreateBorderPainter( 106 SetBorder(views::Border::CreateBorderPainter(
106 new views::HorizontalPainter(border_image_ids), gfx::Insets())); 107 base::WrapUnique(new views::HorizontalPainter(border_image_ids)),
108 gfx::Insets()));
107 } 109 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698