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

Side by Side Diff: chrome/browser/icon_loader_win.cc

Issue 915002: Create a toplevel gfx/ dir and seed it with icon_util.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/aeropeek_manager.cc ('k') | chrome/browser/jumplist.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/icon_loader.h" 5 #include "chrome/browser/icon_loader.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "app/gfx/icon_util.h"
11 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
12 #include "base/message_loop.h" 11 #include "base/message_loop.h"
13 #include "base/thread.h" 12 #include "base/thread.h"
13 #include "gfx/icon_util.h"
14 14
15 void IconLoader::ReadIcon() { 15 void IconLoader::ReadIcon() {
16 int size = 0; 16 int size = 0;
17 switch (icon_size_) { 17 switch (icon_size_) {
18 case IconLoader::SMALL: 18 case IconLoader::SMALL:
19 size = SHGFI_SMALLICON; 19 size = SHGFI_SMALLICON;
20 break; 20 break;
21 case IconLoader::NORMAL: 21 case IconLoader::NORMAL:
22 size = 0; 22 size = 0;
23 break; 23 break;
(...skipping 16 matching lines...) Expand all
40 DCHECK(r); 40 DCHECK(r);
41 r = ::GetObject(icon_info.hbmMask, sizeof(bitmap_info), &bitmap_info); 41 r = ::GetObject(icon_info.hbmMask, sizeof(bitmap_info), &bitmap_info);
42 DCHECK(r); 42 DCHECK(r);
43 43
44 gfx::Size icon_size(bitmap_info.bmWidth, bitmap_info.bmHeight); 44 gfx::Size icon_size(bitmap_info.bmWidth, bitmap_info.bmHeight);
45 bitmap_ = IconUtil::CreateSkBitmapFromHICON(file_info.hIcon, icon_size); 45 bitmap_ = IconUtil::CreateSkBitmapFromHICON(file_info.hIcon, icon_size);
46 46
47 target_message_loop_->PostTask(FROM_HERE, 47 target_message_loop_->PostTask(FROM_HERE,
48 NewRunnableMethod(this, &IconLoader::NotifyDelegate)); 48 NewRunnableMethod(this, &IconLoader::NotifyDelegate));
49 } 49 }
OLDNEW
« no previous file with comments | « chrome/browser/aeropeek_manager.cc ('k') | chrome/browser/jumplist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698