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

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

Issue 7231016: Move app/win/* files to base/win/, ui/base/win and chrome/common/ directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/aeropeek_manager.h" 5 #include "chrome/browser/aeropeek_manager.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 9
10 #include "app/win/shell.h"
11 #include "base/command_line.h" 10 #include "base/command_line.h"
12 #include "base/scoped_native_library.h" 11 #include "base/scoped_native_library.h"
13 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
14 #include "base/win/scoped_comptr.h" 13 #include "base/win/scoped_comptr.h"
15 #include "base/win/scoped_gdi_object.h" 14 #include "base/win/scoped_gdi_object.h"
16 #include "base/win/scoped_hdc.h" 15 #include "base/win/scoped_hdc.h"
16 #include "base/win/shell.h"
17 #include "base/win/windows_version.h" 17 #include "base/win/windows_version.h"
18 #include "chrome/browser/app_icon_win.h" 18 #include "chrome/browser/app_icon_win.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/favicon/favicon_tab_helper.h" 20 #include "chrome/browser/favicon/favicon_tab_helper.h"
21 #include "chrome/browser/sessions/restore_tab_helper.h" 21 #include "chrome/browser/sessions/restore_tab_helper.h"
22 #include "chrome/browser/tab_contents/thumbnail_generator.h" 22 #include "chrome/browser/tab_contents/thumbnail_generator.h"
23 #include "chrome/browser/tabs/tab_strip_model.h" 23 #include "chrome/browser/tabs/tab_strip_model.h"
24 #include "chrome/browser/ui/browser_list.h" 24 #include "chrome/browser/ui/browser_list.h"
25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
26 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 private: 249 private:
250 void Run() { 250 void Run() {
251 // Set the App ID of the browser for this place-holder window to tell 251 // Set the App ID of the browser for this place-holder window to tell
252 // that this window is a child of the browser application, i.e. to tell 252 // that this window is a child of the browser application, i.e. to tell
253 // that this thumbnail window should be displayed when we hover the 253 // that this thumbnail window should be displayed when we hover the
254 // browser icon in the taskbar. 254 // browser icon in the taskbar.
255 // TODO(mattm): This should use ShellIntegration::GetChromiumAppId to work 255 // TODO(mattm): This should use ShellIntegration::GetChromiumAppId to work
256 // properly with multiple profiles. 256 // properly with multiple profiles.
257 app::win::SetAppIdForWindow( 257 base::win::SetAppIdForWindow(
258 BrowserDistribution::GetDistribution()->GetBrowserAppId(), window_); 258 BrowserDistribution::GetDistribution()->GetBrowserAppId(), window_);
259 259
260 // Register this place-holder window to the taskbar as a child of 260 // Register this place-holder window to the taskbar as a child of
261 // the browser window and add it to the end of its tab list. 261 // the browser window and add it to the end of its tab list.
262 // Correctly, this registration should be called after this browser window 262 // Correctly, this registration should be called after this browser window
263 // receives a registered window message "TaskbarButtonCreated", which 263 // receives a registered window message "TaskbarButtonCreated", which
264 // means that Windows creates a taskbar button for this window in its 264 // means that Windows creates a taskbar button for this window in its
265 // taskbar. But it seems to be OK to register it without checking the 265 // taskbar. But it seems to be OK to register it without checking the
266 // message. 266 // message.
267 // TODO(hbono): we need to check this registered message? 267 // TODO(hbono): we need to check this registered message?
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 // This code is just copied from "thumbnail_generator.cc". 1238 // This code is just copied from "thumbnail_generator.cc".
1239 skia::PlatformCanvas canvas; 1239 skia::PlatformCanvas canvas;
1240 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()), 1240 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
1241 &canvas)) 1241 &canvas))
1242 return false; 1242 return false;
1243 1243
1244 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false); 1244 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false);
1245 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); 1245 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config);
1246 return true; 1246 return true;
1247 } 1247 }
OLDNEW
« base/win/shell.h ('K') | « base/win/shell.cc ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698