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

Side by Side Diff: ash/shell/launcher_delegate_impl.cc

Issue 9854009: Add tooltip text for chrome shortcut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add method to ash_shell Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell/launcher_delegate_impl.h" 5 #include "ash/shell/launcher_delegate_impl.h"
6 6
7 #include "ash/shell/toplevel_window.h" 7 #include "ash/shell/toplevel_window.h"
8 #include "ash/shell/window_watcher.h" 8 #include "ash/shell/window_watcher.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace shell { 14 namespace shell {
15 15
16 LauncherDelegateImpl::LauncherDelegateImpl(WindowWatcher* watcher) 16 LauncherDelegateImpl::LauncherDelegateImpl(WindowWatcher* watcher)
17 : watcher_(watcher) { 17 : watcher_(watcher) {
18 } 18 }
19 19
20 LauncherDelegateImpl::~LauncherDelegateImpl() { 20 LauncherDelegateImpl::~LauncherDelegateImpl() {
21 } 21 }
22 22
23 // In the shell we'll create a window all the time.
23 void LauncherDelegateImpl::CreateNewTab() { 24 void LauncherDelegateImpl::CreateNewTab() {
25 CreateNewWindow();
26 }
27
28 void LauncherDelegateImpl::CreateNewWindow() {
24 ash::shell::ToplevelWindow::CreateParams create_params; 29 ash::shell::ToplevelWindow::CreateParams create_params;
25 create_params.can_resize = true; 30 create_params.can_resize = true;
26 create_params.can_maximize = true; 31 create_params.can_maximize = true;
27 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); 32 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params);
28 } 33 }
29 34
30 void LauncherDelegateImpl::ItemClicked(const ash::LauncherItem& item) { 35 void LauncherDelegateImpl::ItemClicked(const ash::LauncherItem& item) {
31 aura::Window* window = watcher_->GetWindowByID(item.id); 36 aura::Window* window = watcher_->GetWindowByID(item.id);
32 window->Show(); 37 window->Show();
33 ash::wm::ActivateWindow(window); 38 ash::wm::ActivateWindow(window);
(...skipping 11 matching lines...) Expand all
45 const ash::LauncherItem& item) { 50 const ash::LauncherItem& item) {
46 return NULL; 51 return NULL;
47 } 52 }
48 53
49 ash::LauncherID LauncherDelegateImpl::GetIDByWindow(aura::Window* window) { 54 ash::LauncherID LauncherDelegateImpl::GetIDByWindow(aura::Window* window) {
50 return watcher_->GetIDByWindow(window); 55 return watcher_->GetIDByWindow(window);
51 } 56 }
52 57
53 } // namespace shell 58 } // namespace shell
54 } // namespace ash 59 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/launcher_delegate_impl.h ('k') | chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698