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

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

Issue 745093002: AppShell support for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jamescook2 Created 6 years 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698