Chromium Code Reviews| 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 #include "extensions/shell/browser/desktop_controller.h" | |
| 6 | |
| 7 #include "base/memory/scoped_ptr.h" | |
| 8 | |
| 9 namespace extensions { | |
| 10 | |
| 11 class AppWindow; | |
| 12 class AppWindowClient; | |
| 13 | |
| 14 // A simple implementation of the app_shell DesktopController for Mac Cocoa. | |
| 15 // Only currently supports one app window (unlike Aura). | |
|
James Cook
2014/12/10 21:05:01
Nice class comment.
| |
| 16 class ShellDesktopControllerMac : public DesktopController { | |
| 17 public: | |
| 18 ShellDesktopControllerMac(); | |
| 19 ~ShellDesktopControllerMac() override; | |
| 20 | |
| 21 // DesktopController: | |
| 22 gfx::Size GetWindowSize() override; | |
| 23 AppWindow* CreateAppWindow(content::BrowserContext* context, | |
| 24 const Extension* extension) override; | |
| 25 void AddAppWindow(gfx::NativeWindow window) override; | |
| 26 void RemoveAppWindow(AppWindow* window) override; | |
| 27 void CloseAppWindows() override; | |
| 28 | |
| 29 private: | |
| 30 scoped_ptr<AppWindowClient> app_window_client_; | |
| 31 | |
| 32 // The desktop only supports a single app window. | |
| 33 // TODO(yoz): Support multiple app windows, as we do in Aura. | |
| 34 AppWindow* app_window_; // NativeAppWindow::Close() deletes this. | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(ShellDesktopControllerMac); | |
|
James Cook
2014/12/10 21:05:01
#include "base/macros.h"
Yoyo Zhou
2014/12/11 02:40:50
Done.
| |
| 37 }; | |
| 38 | |
| 39 } // namespace extensions | |
| OLD | NEW |