Remove ExtensionPrefs::SetDidExtensionEscalatePermissions.
[chromium-blink-merge.git] / extensions / shell / browser / shell_desktop_controller_mac.h
blobdda610c7fe7289c5c4c7a7715bfc7078c7c9d98f
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_
8 #include "extensions/shell/browser/desktop_controller.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace extensions {
15 class AppWindow;
16 class AppWindowClient;
18 // A simple implementation of the app_shell DesktopController for Mac Cocoa.
19 // Only currently supports one app window (unlike Aura).
20 class ShellDesktopControllerMac : public DesktopController {
21 public:
22 ShellDesktopControllerMac();
23 ~ShellDesktopControllerMac() override;
25 // DesktopController:
26 gfx::Size GetWindowSize() override;
27 AppWindow* CreateAppWindow(content::BrowserContext* context,
28 const Extension* extension) override;
29 void AddAppWindow(gfx::NativeWindow window) override;
30 void RemoveAppWindow(AppWindow* window) override;
31 void CloseAppWindows() override;
33 private:
34 scoped_ptr<AppWindowClient> app_window_client_;
36 // The desktop only supports a single app window.
37 // TODO(yoz): Support multiple app windows, as we do in Aura.
38 AppWindow* app_window_; // NativeAppWindow::Close() deletes this.
40 DISALLOW_COPY_AND_ASSIGN(ShellDesktopControllerMac);
43 } // namespace extensions
45 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_