OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser_shortcut_launcher_item_controll
er.h" | 5 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return; | 101 return; |
102 } | 102 } |
103 | 103 |
104 launcher_controller()->ActivateWindowOrMinimizeIfActive( | 104 launcher_controller()->ActivateWindowOrMinimizeIfActive( |
105 last_browser->window(), GetApplicationList(0).size() == 2); | 105 last_browser->window(), GetApplicationList(0).size() == 2); |
106 } | 106 } |
107 | 107 |
108 void BrowserShortcutLauncherItemController::Close() { | 108 void BrowserShortcutLauncherItemController::Close() { |
109 } | 109 } |
110 | 110 |
111 void BrowserShortcutLauncherItemController::LauncherItemChanged( | |
112 int model_index, | |
113 const ash::LauncherItem& old_item) { | |
114 } | |
115 | |
116 void BrowserShortcutLauncherItemController::Clicked(const ui::Event& event) { | 111 void BrowserShortcutLauncherItemController::Clicked(const ui::Event& event) { |
117 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
118 chromeos::default_pinned_apps_field_trial::RecordShelfClick( | 113 chromeos::default_pinned_apps_field_trial::RecordShelfClick( |
119 chromeos::default_pinned_apps_field_trial::CHROME); | 114 chromeos::default_pinned_apps_field_trial::CHROME); |
120 #endif | 115 #endif |
121 | 116 |
122 if (event.flags() & ui::EF_CONTROL_DOWN) { | 117 if (event.flags() & ui::EF_CONTROL_DOWN) { |
123 launcher_controller()->CreateNewWindow(); | 118 launcher_controller()->CreateNewWindow(); |
124 return; | 119 return; |
125 } | 120 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 chrome::HOST_DESKTOP_TYPE_ASH); | 250 chrome::HOST_DESKTOP_TYPE_ASH); |
256 if (!browser || | 251 if (!browser || |
257 !launcher_controller()->IsBrowserRepresentedInBrowserList(browser)) | 252 !launcher_controller()->IsBrowserRepresentedInBrowserList(browser)) |
258 browser = items[0]; | 253 browser = items[0]; |
259 } | 254 } |
260 } | 255 } |
261 DCHECK(browser); | 256 DCHECK(browser); |
262 browser->window()->Show(); | 257 browser->window()->Show(); |
263 browser->window()->Activate(); | 258 browser->window()->Activate(); |
264 } | 259 } |
OLD | NEW |