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

Side by Side Diff: extensions/browser/test_image_loader.h

Issue 1302423005: Task manager's apps and extensions should show the correct favicon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up the browser test Created 5 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_BROWSER_TEST_IMAGE_LOADER_H_
6 #define EXTENSIONS_BROWSER_TEST_IMAGE_LOADER_H_
7
8 #include "base/run_loop.h"
9 #include "ui/gfx/image/image.h"
10
11 namespace extensions {
12
13 class Extension;
14
15 // Helper class for synchronously loading an extension image resource.
16 class TestImageLoader {
17 public:
18 TestImageLoader();
19 ~TestImageLoader();
20
21 // Loads an image to be used in test from |extension|.
22 // The image will be loaded from the relative path |image_path|.
23 static SkBitmap LoadAndGetExtensionBitmap(const Extension* extension,
24 const std::string& image_path,
25 int size);
26
27 private:
28 void OnImageLoaded(const gfx::Image& image);
29
30 SkBitmap LoadAndGetBitmap(const Extension* extension,
31 const std::string& path,
32 int size);
33
34 gfx::Image image_;
35 base::Closure loader_message_loop_quit_;
36 bool waiting_;
37 bool image_loaded_;
38
39 DISALLOW_COPY_AND_ASSIGN(TestImageLoader);
40 };
41
42 } // namespace extensions
43
44 #endif // EXTENSIONS_BROWSER_TEST_IMAGE_LOADER_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_icon_image_unittest.cc ('k') | extensions/browser/test_image_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698