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