| 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> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 #include "extensions/browser/app_window/app_delegate.h" | 15 #include "extensions/browser/app_window/app_delegate.h" |
| 16 #include "extensions/renderer/mojo/frame_observer.mojom.h" |
| 16 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
| 17 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 18 | 19 |
| 19 class ScopedKeepAlive; | 20 class ScopedKeepAlive; |
| 20 | 21 |
| 21 class ChromeAppDelegate : public extensions::AppDelegate, | 22 class ChromeAppDelegate : public extensions::AppDelegate, |
| 22 public content::NotificationObserver { | 23 public content::NotificationObserver { |
| 23 public: | 24 public: |
| 24 // Params: | 25 // Params: |
| 25 // keep_alive: Whether this object should keep the browser alive. | 26 // keep_alive: Whether this object should keep the browser alive. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void Observe(int type, | 76 void Observe(int type, |
| 76 const content::NotificationSource& source, | 77 const content::NotificationSource& source, |
| 77 const content::NotificationDetails& details) override; | 78 const content::NotificationDetails& details) override; |
| 78 | 79 |
| 79 bool has_been_shown_; | 80 bool has_been_shown_; |
| 80 bool is_hidden_; | 81 bool is_hidden_; |
| 81 std::unique_ptr<ScopedKeepAlive> keep_alive_; | 82 std::unique_ptr<ScopedKeepAlive> keep_alive_; |
| 82 std::unique_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; | 83 std::unique_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; |
| 83 base::Closure terminating_callback_; | 84 base::Closure terminating_callback_; |
| 84 content::NotificationRegistrar registrar_; | 85 content::NotificationRegistrar registrar_; |
| 86 extensions::mojom::FrameObserverPtr extensions_frame_observer_; |
| 85 base::WeakPtrFactory<ChromeAppDelegate> weak_factory_; | 87 base::WeakPtrFactory<ChromeAppDelegate> weak_factory_; |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); | 89 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 92 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
| OLD | NEW |