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

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

Issue 9835081: Change the launcher to create new tabs instead of windows when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell/launcher_delegate_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ 5 #ifndef ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_
6 #define ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ 6 #define ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/launcher/launcher_delegate.h" 9 #include "ash/launcher/launcher_delegate.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 11
12 namespace aura { 12 namespace aura {
13 class Window; 13 class Window;
14 } 14 }
15 15
16 namespace ash { 16 namespace ash {
17 namespace shell { 17 namespace shell {
18 18
19 class WindowWatcher; 19 class WindowWatcher;
20 20
21 class LauncherDelegateImpl : public ash::LauncherDelegate { 21 class LauncherDelegateImpl : public ash::LauncherDelegate {
22 public: 22 public:
23 explicit LauncherDelegateImpl(WindowWatcher* watcher); 23 explicit LauncherDelegateImpl(WindowWatcher* watcher);
24 virtual ~LauncherDelegateImpl(); 24 virtual ~LauncherDelegateImpl();
25 25
26 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } 26 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; }
27 27
28 // LauncherDelegate overrides: 28 // LauncherDelegate overrides:
29 virtual void CreateNewWindow() OVERRIDE; 29 virtual void CreateNewTab() OVERRIDE;
30 virtual void ItemClicked(const ash::LauncherItem& item) OVERRIDE; 30 virtual void ItemClicked(const ash::LauncherItem& item) OVERRIDE;
31 virtual int GetBrowserShortcutResourceId() OVERRIDE; 31 virtual int GetBrowserShortcutResourceId() OVERRIDE;
32 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; 32 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE;
33 virtual ui::MenuModel* CreateContextMenu( 33 virtual ui::MenuModel* CreateContextMenu(
34 const ash::LauncherItem& item) OVERRIDE; 34 const ash::LauncherItem& item) OVERRIDE;
35 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; 35 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE;
36 36
37 private: 37 private:
38 // Used to update Launcher. Owned by main. 38 // Used to update Launcher. Owned by main.
39 WindowWatcher* watcher_; 39 WindowWatcher* watcher_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl); 41 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl);
42 }; 42 };
43 43
44 } // namespace shell 44 } // namespace shell
45 } // namespace ash 45 } // namespace ash
46 46
47 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ 47 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell/launcher_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698