| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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. | 
|  | 4 | 
|  | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_ | 
|  | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_ | 
|  | 7 | 
|  | 8 #include "extensions/shell/browser/desktop_controller.h" | 
|  | 9 | 
|  | 10 #include "base/macros.h" | 
|  | 11 #include "base/memory/scoped_ptr.h" | 
|  | 12 | 
|  | 13 namespace extensions { | 
|  | 14 | 
|  | 15 class AppWindow; | 
|  | 16 class AppWindowClient; | 
|  | 17 | 
|  | 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; | 
|  | 24 | 
|  | 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; | 
|  | 32 | 
|  | 33  private: | 
|  | 34   scoped_ptr<AppWindowClient> app_window_client_; | 
|  | 35 | 
|  | 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. | 
|  | 39 | 
|  | 40   DISALLOW_COPY_AND_ASSIGN(ShellDesktopControllerMac); | 
|  | 41 }; | 
|  | 42 | 
|  | 43 }  // namespace extensions | 
|  | 44 | 
|  | 45 #endif  // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_MAC_H_ | 
| OLD | NEW | 
|---|