| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/lazy_instance.h" | 6 #include "base/lazy_instance.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "chrome/browser/speech/speech_recognition_bubble.h" | 8 #include "chrome/browser/speech/speech_recognition_bubble.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| 11 #include "grit/theme_resources.h" | 11 #include "grit/theme_resources_standard.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 #include "ui/gfx/skbitmap_operations.h" | 15 #include "ui/gfx/skbitmap_operations.h" |
| 16 | 16 |
| 17 using content::WebContents; | 17 using content::WebContents; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const color_utils::HSL kGrayscaleShift = { -1, 0, 0.6 }; | 21 const color_utils::HSL kGrayscaleShift = { -1, 0, 0.6 }; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 242 } |
| 243 | 243 |
| 244 void SpeechRecognitionBubbleBase::SetImage(const gfx::ImageSkia& image) { | 244 void SpeechRecognitionBubbleBase::SetImage(const gfx::ImageSkia& image) { |
| 245 icon_image_.reset(new gfx::ImageSkia(image)); | 245 icon_image_.reset(new gfx::ImageSkia(image)); |
| 246 UpdateImage(); | 246 UpdateImage(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 gfx::ImageSkia SpeechRecognitionBubbleBase::icon_image() { | 249 gfx::ImageSkia SpeechRecognitionBubbleBase::icon_image() { |
| 250 return (icon_image_ != NULL) ? *icon_image_ : gfx::ImageSkia(); | 250 return (icon_image_ != NULL) ? *icon_image_ : gfx::ImageSkia(); |
| 251 } | 251 } |
| OLD | NEW |