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

Side by Side Diff: chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc

Issue 1581473002: Remove base/win/metro.{cc|h} and some associated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 11 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/views/app_list/win/app_list_controller_delegate_win. h" 5 #include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win. h"
6 6
7 #include "chrome/browser/metro_utils/metro_chrome_win.h"
8 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/app_list_icon_win.h" 8 #include "chrome/browser/ui/app_list/app_list_icon_win.h"
10 #include "chrome/browser/ui/extensions/application_launch.h" 9 #include "chrome/browser/ui/extensions/application_launch.h"
11 #include "chrome/browser/ui/host_desktop.h" 10 #include "chrome/browser/ui/host_desktop.h"
12 #include "extensions/browser/app_window/app_window.h" 11 #include "extensions/browser/app_window/app_window.h"
13 #include "extensions/browser/app_window/app_window_registry.h" 12 #include "extensions/browser/app_window/app_window_registry.h"
14 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
15 14
16 AppListControllerDelegateWin::AppListControllerDelegateWin( 15 AppListControllerDelegateWin::AppListControllerDelegateWin(
17 AppListServiceViews* service) 16 AppListServiceViews* service)
18 : AppListControllerDelegateViews(service) {} 17 : AppListControllerDelegateViews(service) {}
19 18
20 AppListControllerDelegateWin::~AppListControllerDelegateWin() {} 19 AppListControllerDelegateWin::~AppListControllerDelegateWin() {}
21 20
22 bool AppListControllerDelegateWin::ForceNativeDesktop() const { 21 bool AppListControllerDelegateWin::ForceNativeDesktop() const {
23 return true; 22 return true;
24 } 23 }
25 24
26 gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() { 25 gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() {
27 gfx::ImageSkia* resource = ResourceBundle::GetSharedInstance(). 26 gfx::ImageSkia* resource = ResourceBundle::GetSharedInstance().
28 GetImageSkiaNamed(GetAppListIconResourceId()); 27 GetImageSkiaNamed(GetAppListIconResourceId());
29 return *resource; 28 return *resource;
30 } 29 }
31 30
32 void AppListControllerDelegateWin::FillLaunchParams(AppLaunchParams* params) { 31 void AppListControllerDelegateWin::FillLaunchParams(AppLaunchParams* params) {
33 params->desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; 32 params->desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
34 extensions::AppWindow* any_existing_window =
35 extensions::AppWindowRegistry::Get(params->profile)
36 ->GetCurrentAppWindowForApp(params->extension_id);
37 if (any_existing_window &&
38 chrome::GetHostDesktopTypeForNativeWindow(
39 any_existing_window->GetNativeWindow())
40 != chrome::HOST_DESKTOP_TYPE_NATIVE) {
41 params->desktop_type = chrome::HOST_DESKTOP_TYPE_ASH;
42 chrome::ActivateMetroChrome();
43 }
44 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698