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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller.h

Issue 642383003: Add the ability to load multiple apps into app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_
7 7
8 #include <vector>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "extensions/shell/browser/desktop_controller.h" 13 #include "extensions/shell/browser/desktop_controller.h"
12 #include "ui/aura/client/window_tree_client.h" 14 #include "ui/aura/client/window_tree_client.h"
13 #include "ui/aura/window_tree_host_observer.h" 15 #include "ui/aura/window_tree_host_observer.h"
14 16
15 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
16 #include "chromeos/dbus/power_manager_client.h" 18 #include "chromeos/dbus/power_manager_client.h"
17 #include "ui/display/chromeos/display_configurator.h" 19 #include "ui/display/chromeos/display_configurator.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 public aura::WindowTreeHostObserver { 64 public aura::WindowTreeHostObserver {
63 public: 65 public:
64 ShellDesktopController(); 66 ShellDesktopController();
65 virtual ~ShellDesktopController(); 67 virtual ~ShellDesktopController();
66 68
67 // DesktopController: 69 // DesktopController:
68 virtual aura::WindowTreeHost* GetHost() override; 70 virtual aura::WindowTreeHost* GetHost() override;
69 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, 71 virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
70 const Extension* extension) override; 72 const Extension* extension) override;
71 virtual void AddAppWindow(aura::Window* window) override; 73 virtual void AddAppWindow(aura::Window* window) override;
74 virtual void RemoveAppWindow(AppWindow* window) override;
72 virtual void CloseAppWindows() override; 75 virtual void CloseAppWindows() override;
73 76
74 // aura::client::WindowTreeClient overrides: 77 // aura::client::WindowTreeClient overrides:
75 virtual aura::Window* GetDefaultParent(aura::Window* context, 78 virtual aura::Window* GetDefaultParent(aura::Window* context,
76 aura::Window* window, 79 aura::Window* window,
77 const gfx::Rect& bounds) override; 80 const gfx::Rect& bounds) override;
78 81
79 #if defined(OS_CHROMEOS) 82 #if defined(OS_CHROMEOS)
80 // chromeos::PowerManagerClient::Observer overrides: 83 // chromeos::PowerManagerClient::Observer overrides:
81 virtual void PowerButtonEventReceived(bool down, 84 virtual void PowerButtonEventReceived(bool down,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 127
125 scoped_ptr<wm::CursorManager> cursor_manager_; 128 scoped_ptr<wm::CursorManager> cursor_manager_;
126 129
127 scoped_ptr<wm::UserActivityDetector> user_activity_detector_; 130 scoped_ptr<wm::UserActivityDetector> user_activity_detector_;
128 #if defined(OS_CHROMEOS) 131 #if defined(OS_CHROMEOS)
129 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; 132 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
130 #endif 133 #endif
131 134
132 scoped_ptr<AppWindowClient> app_window_client_; 135 scoped_ptr<AppWindowClient> app_window_client_;
133 136
134 // The desktop supports a single app window. 137 // NativeAppWindow::Close() deletes the AppWindow.
135 AppWindow* app_window_; // NativeAppWindow::Close() deletes this. 138 std::vector<AppWindow*> app_windows_;
136 139
137 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); 140 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController);
138 }; 141 };
139 142
140 } // namespace extensions 143 } // namespace extensions
141 144
142 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ 145 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698