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

Side by Side Diff: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc

Issue 202993002: Fix "unreachable code" warnings (MSVC warning 4702) in chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 "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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | chrome/browser/extensions/api/input/input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698