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

Side by Side Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/media/media_stream_capture_indicator.h" 5 #include "chrome/browser/media/media_stream_capture_indicator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 EnsureStatusTrayIcon(); 152 EnsureStatusTrayIcon();
153 DCHECK(!tray_image_.empty()); 153 DCHECK(!tray_image_.empty());
154 DCHECK(!balloon_image_.empty()); 154 DCHECK(!balloon_image_.empty());
155 155
156 status_icon_->SetImage(tray_image_); 156 status_icon_->SetImage(tray_image_);
157 } 157 }
158 158
159 void MediaStreamCaptureIndicator::EnsureStatusTrayIcon() { 159 void MediaStreamCaptureIndicator::EnsureStatusTrayIcon() {
160 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 160 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
161 if (tray_image_.empty()) { 161 if (tray_image_.empty()) {
162 tray_image_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( 162 tray_image_ = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
163 IDR_MEDIA_STREAM_CAPTURE_LED); 163 IDR_MEDIA_STREAM_CAPTURE_LED);
164 } 164 }
165 if (balloon_image_.empty()) { 165 if (balloon_image_.empty()) {
166 balloon_image_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( 166 balloon_image_ = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
167 IDR_PRODUCT_LOGO_32); 167 IDR_PRODUCT_LOGO_32);
168 } 168 }
169 } 169 }
170 170
171 void MediaStreamCaptureIndicator::ShowBalloon( 171 void MediaStreamCaptureIndicator::ShowBalloon(
172 int render_process_id, 172 int render_process_id,
173 int render_view_id, 173 int render_view_id,
174 bool audio, 174 bool audio,
175 bool video) const { 175 bool video) const {
176 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 176 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 // Remove the last character if it is a '/'. 361 // Remove the last character if it is a '/'.
362 if (!security_origin.empty()) { 362 if (!security_origin.empty()) {
363 std::string::iterator it = security_origin.end() - 1; 363 std::string::iterator it = security_origin.end() - 1;
364 if (*it == '/') 364 if (*it == '/')
365 security_origin.erase(it); 365 security_origin.erase(it);
366 } 366 }
367 367
368 return UTF8ToUTF16(security_origin); 368 return UTF8ToUTF16(security_origin);
369 } 369 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_capture_indicator.h ('k') | chrome/browser/ntp_background_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698