app_list_controller_delegate_win.cc revision 1e9bf3e0803691d0a228da41fc608347b6db4340
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 3// found in the LICENSE file. 4 5#include "chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.h" 6 7#include "chrome/browser/ui/app_list/app_list_icon_win.h" 8#include "chrome/browser/ui/views/app_list/win/app_list_service_win.h" 9#include "ui/base/resource/resource_bundle.h" 10 11AppListControllerDelegateWin::AppListControllerDelegateWin( 12 AppListServiceWin* service) 13 : AppListControllerDelegateImpl(service), 14 service_(service) {} 15 16AppListControllerDelegateWin::~AppListControllerDelegateWin() {} 17 18void AppListControllerDelegateWin::ViewClosing() { 19 service_->OnAppListClosing(); 20} 21 22gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() { 23 gfx::ImageSkia* resource = ResourceBundle::GetSharedInstance(). 24 GetImageSkiaNamed(GetAppListIconResourceId()); 25 return *resource; 26} 27 28void AppListControllerDelegateWin::OnShowExtensionPrompt() { 29 service_->set_can_close(false); 30} 31 32void AppListControllerDelegateWin::OnCloseExtensionPrompt() { 33 service_->set_can_close(true); 34} 35 36bool AppListControllerDelegateWin::CanDoCreateShortcutsFlow() { 37 return true; 38} 39