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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 gfx::ImageSkia AddBackgroundForViews(const Extension* extension, | 52 gfx::ImageSkia AddBackgroundForViews(const Extension* extension, |
53 const gfx::ImageSkia& icon) { | 53 const gfx::ImageSkia& icon) { |
54 #if defined(TOOLKIT_VIEWS) | 54 #if defined(TOOLKIT_VIEWS) |
55 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 55 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
56 gfx::ImageSkia bg = *rb.GetImageSkiaNamed(IDR_BROWSER_ACTION); | 56 gfx::ImageSkia bg = *rb.GetImageSkiaNamed(IDR_BROWSER_ACTION); |
57 // We may have a different background than the default - see | 57 // We may have a different background than the default - see |
58 // BrowserActionButton::UpdateState. | 58 // BrowserActionButton::UpdateState. |
59 if (extensions::DevModeBubbleController::IsDevModeExtension(extension)) | 59 if (extensions::DevModeBubbleController::IsDevModeExtension(extension)) |
60 bg = *rb.GetImageSkiaNamed(IDR_BROWSER_ACTION_HIGHLIGHT); | 60 bg = *rb.GetImageSkiaNamed(IDR_BROWSER_ACTION_HIGHLIGHT); |
61 return gfx::ImageSkiaOperations::CreateSuperimposedImage(bg, icon); | 61 return gfx::ImageSkiaOperations::CreateSuperimposedImage(bg, icon); |
| 62 #else |
| 63 return icon; |
62 #endif | 64 #endif |
63 | |
64 return icon; | |
65 } | 65 } |
66 | 66 |
67 bool ImagesAreEqualAtScale(const gfx::ImageSkia& i1, | 67 bool ImagesAreEqualAtScale(const gfx::ImageSkia& i1, |
68 const gfx::ImageSkia& i2, | 68 const gfx::ImageSkia& i2, |
69 float scale) { | 69 float scale) { |
70 SkBitmap bitmap1 = i1.GetRepresentation(scale).sk_bitmap(); | 70 SkBitmap bitmap1 = i1.GetRepresentation(scale).sk_bitmap(); |
71 SkBitmap bitmap2 = i2.GetRepresentation(scale).sk_bitmap(); | 71 SkBitmap bitmap2 = i2.GetRepresentation(scale).sk_bitmap(); |
72 return gfx::BitmapsAreEqual(bitmap1, bitmap2); | 72 return gfx::BitmapsAreEqual(bitmap1, bitmap2); |
73 } | 73 } |
74 | 74 |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 "backgroundColor);"; | 730 "backgroundColor);"; |
731 std::string result; | 731 std::string result; |
732 const std::string frame_xpath; | 732 const std::string frame_xpath; |
733 EXPECT_TRUE(content::ExecuteScriptInFrameAndExtractString( | 733 EXPECT_TRUE(content::ExecuteScriptInFrameAndExtractString( |
734 tab, frame_xpath, script, &result)); | 734 tab, frame_xpath, script, &result)); |
735 EXPECT_EQ(result, "red"); | 735 EXPECT_EQ(result, "red"); |
736 } | 736 } |
737 | 737 |
738 } // namespace | 738 } // namespace |
739 } // namespace extensions | 739 } // namespace extensions |
OLD | NEW |