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

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

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT 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 #include "chrome/browser/speech/speech_recognition_bubble.h" 5 #include "chrome/browser/speech/speech_recognition_bubble.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return anchor; 130 return anchor;
131 } 131 }
132 132
133 void SpeechRecognitionBubbleView::Init() { 133 void SpeechRecognitionBubbleView::Init() {
134 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 134 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
135 const gfx::FontList& font_list = 135 const gfx::FontList& font_list =
136 rb.GetFontList(ui::ResourceBundle::MediumFont); 136 rb.GetFontList(ui::ResourceBundle::MediumFont);
137 137
138 heading_ = new views::Label( 138 heading_ = new views::Label(
139 l10n_util::GetStringUTF16(IDS_SPEECH_INPUT_BUBBLE_HEADING), font_list); 139 l10n_util::GetStringUTF16(IDS_SPEECH_INPUT_BUBBLE_HEADING), font_list);
140 heading_->set_border(views::Border::CreateEmptyBorder( 140 heading_->SetBorder(views::Border::CreateEmptyBorder(
141 kBubbleHeadingVertMargin, 0, kBubbleHeadingVertMargin, 0)); 141 kBubbleHeadingVertMargin, 0, kBubbleHeadingVertMargin, 0));
142 heading_->SetHorizontalAlignment(gfx::ALIGN_CENTER); 142 heading_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
143 AddChildView(heading_); 143 AddChildView(heading_);
144 144
145 message_ = new views::Label(base::string16(), font_list); 145 message_ = new views::Label(base::string16(), font_list);
146 message_->SetMultiLine(true); 146 message_->SetMultiLine(true);
147 AddChildView(message_); 147 AddChildView(message_);
148 148
149 icon_ = new views::ImageView(); 149 icon_ = new views::ImageView();
150 icon_->SetHorizontalAlignment(views::ImageView::CENTER); 150 icon_->SetHorizontalAlignment(views::ImageView::CENTER);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 } // namespace 397 } // namespace
398 398
399 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble( 399 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble(
400 WebContents* web_contents, 400 WebContents* web_contents,
401 SpeechRecognitionBubble::Delegate* delegate, 401 SpeechRecognitionBubble::Delegate* delegate,
402 const gfx::Rect& element_rect) { 402 const gfx::Rect& element_rect) {
403 return new SpeechRecognitionBubbleImpl(web_contents, delegate, element_rect); 403 return new SpeechRecognitionBubbleImpl(web_contents, delegate, element_rect);
404 } 404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698