| OLD | NEW |
| 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/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 manager->ShowWindowForUser(native_window, current_user); | 1059 manager->ShowWindowForUser(native_window, current_user); |
| 1060 window->Activate(); | 1060 window->Activate(); |
| 1061 return; | 1061 return; |
| 1062 } | 1062 } |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 if (window->IsActive() && allow_minimize) { | 1065 if (window->IsActive() && allow_minimize) { |
| 1066 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1066 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1067 switches::kDisableMinimizeOnSecondLauncherItemClick)) { | 1067 switches::kDisableMinimizeOnSecondLauncherItemClick)) { |
| 1068 AnimateWindow(window->GetNativeWindow(), | 1068 AnimateWindow(window->GetNativeWindow(), |
| 1069 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); | 1069 wm::WINDOW_ANIMATION_TYPE_BOUNCE); |
| 1070 } else { | 1070 } else { |
| 1071 window->Minimize(); | 1071 window->Minimize(); |
| 1072 } | 1072 } |
| 1073 } else { | 1073 } else { |
| 1074 window->Show(); | 1074 window->Show(); |
| 1075 window->Activate(); | 1075 window->Activate(); |
| 1076 } | 1076 } |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 void ChromeLauncherController::OnShelfCreated(ash::Shelf* shelf) { | 1079 void ChromeLauncherController::OnShelfCreated(ash::Shelf* shelf) { |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 void ChromeLauncherController::ReleaseProfile() { | 2060 void ChromeLauncherController::ReleaseProfile() { |
| 2061 if (app_sync_ui_state_) | 2061 if (app_sync_ui_state_) |
| 2062 app_sync_ui_state_->RemoveObserver(this); | 2062 app_sync_ui_state_->RemoveObserver(this); |
| 2063 | 2063 |
| 2064 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2064 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
| 2065 | 2065 |
| 2066 pref_change_registrar_.RemoveAll(); | 2066 pref_change_registrar_.RemoveAll(); |
| 2067 } | 2067 } |
| OLD | NEW |