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/bubble/bubble_frame_view.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
« no previous file with comments | « ui/ozone/public/surface_factory_ozone.cc ('k') | ui/views/controls/button/label_button.cc » ('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 "ui/views/bubble/bubble_frame_view.h" 5 #include "ui/views/bubble/bubble_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/base/hit_test.h" 9 #include "ui/base/hit_test.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // static 85 // static
86 LabelButton* BubbleFrameView::CreateCloseButton(ButtonListener* listener) { 86 LabelButton* BubbleFrameView::CreateCloseButton(ButtonListener* listener) {
87 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 87 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
88 LabelButton* close = new LabelButton(listener, base::string16()); 88 LabelButton* close = new LabelButton(listener, base::string16());
89 close->SetImage(CustomButton::STATE_NORMAL, 89 close->SetImage(CustomButton::STATE_NORMAL,
90 *rb.GetImageNamed(IDR_CLOSE_DIALOG).ToImageSkia()); 90 *rb.GetImageNamed(IDR_CLOSE_DIALOG).ToImageSkia());
91 close->SetImage(CustomButton::STATE_HOVERED, 91 close->SetImage(CustomButton::STATE_HOVERED,
92 *rb.GetImageNamed(IDR_CLOSE_DIALOG_H).ToImageSkia()); 92 *rb.GetImageNamed(IDR_CLOSE_DIALOG_H).ToImageSkia());
93 close->SetImage(CustomButton::STATE_PRESSED, 93 close->SetImage(CustomButton::STATE_PRESSED,
94 *rb.GetImageNamed(IDR_CLOSE_DIALOG_P).ToImageSkia()); 94 *rb.GetImageNamed(IDR_CLOSE_DIALOG_P).ToImageSkia());
95 close->SetBorder(scoped_ptr<Border>()); 95 close->SetBorder(nullptr);
96 close->SetSize(close->GetPreferredSize()); 96 close->SetSize(close->GetPreferredSize());
97 return close; 97 return close;
98 } 98 }
99 99
100 gfx::Rect BubbleFrameView::GetBoundsForClientView() const { 100 gfx::Rect BubbleFrameView::GetBoundsForClientView() const {
101 gfx::Rect client_bounds = GetLocalBounds(); 101 gfx::Rect client_bounds = GetLocalBounds();
102 client_bounds.Inset(GetInsets()); 102 client_bounds.Inset(GetInsets());
103 client_bounds.Inset(bubble_border_->GetInsets()); 103 client_bounds.Inset(bubble_border_->GetInsets());
104 return client_bounds; 104 return client_bounds;
105 } 105 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (titlebar_extra_view_ != NULL) 378 if (titlebar_extra_view_ != NULL)
379 title_bar_width += titlebar_extra_view_->GetPreferredSize().width(); 379 title_bar_width += titlebar_extra_view_->GetPreferredSize().width();
380 gfx::Size size(client_size); 380 gfx::Size size(client_size);
381 size.SetToMax(gfx::Size(title_bar_width, 0)); 381 size.SetToMax(gfx::Size(title_bar_width, 0));
382 const gfx::Insets insets(GetInsets()); 382 const gfx::Insets insets(GetInsets());
383 size.Enlarge(insets.width(), insets.height()); 383 size.Enlarge(insets.width(), insets.height());
384 return size; 384 return size;
385 } 385 }
386 386
387 } // namespace views 387 } // namespace views
OLDNEW
« no previous file with comments | « ui/ozone/public/surface_factory_ozone.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698