OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
14 #include "extensions/browser/app_window/app_delegate.h" | 15 #include "extensions/browser/app_window/app_delegate.h" |
15 #include "ui/base/window_open_disposition.h" | 16 #include "ui/base/window_open_disposition.h" |
16 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
17 | 18 |
18 class ScopedKeepAlive; | 19 class ScopedKeepAlive; |
19 | 20 |
20 class ChromeAppDelegate : public extensions::AppDelegate, | 21 class ChromeAppDelegate : public extensions::AppDelegate, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void OnHide() override; | 71 void OnHide() override; |
71 void OnShow() override; | 72 void OnShow() override; |
72 | 73 |
73 // content::NotificationObserver: | 74 // content::NotificationObserver: |
74 void Observe(int type, | 75 void Observe(int type, |
75 const content::NotificationSource& source, | 76 const content::NotificationSource& source, |
76 const content::NotificationDetails& details) override; | 77 const content::NotificationDetails& details) override; |
77 | 78 |
78 bool has_been_shown_; | 79 bool has_been_shown_; |
79 bool is_hidden_; | 80 bool is_hidden_; |
80 scoped_ptr<ScopedKeepAlive> keep_alive_; | 81 std::unique_ptr<ScopedKeepAlive> keep_alive_; |
81 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; | 82 std::unique_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; |
82 base::Closure terminating_callback_; | 83 base::Closure terminating_callback_; |
83 content::NotificationRegistrar registrar_; | 84 content::NotificationRegistrar registrar_; |
84 base::WeakPtrFactory<ChromeAppDelegate> weak_factory_; | 85 base::WeakPtrFactory<ChromeAppDelegate> weak_factory_; |
85 | 86 |
86 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); |
87 }; | 88 }; |
88 | 89 |
89 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 90 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
OLD | NEW |