| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/ui/views/app_list/keep_alive_service.h" | 9 #include "chrome/browser/ui/app_list/keep_alive_service.h" |
| 10 | 10 |
| 11 class ScopedKeepAlive { | 11 class ScopedKeepAlive { |
| 12 public: | 12 public: |
| 13 ScopedKeepAlive(); | 13 ScopedKeepAlive(); |
| 14 ~ScopedKeepAlive(); | 14 ~ScopedKeepAlive(); |
| 15 | 15 |
| 16 private: | 16 private: |
| 17 DISALLOW_COPY_AND_ASSIGN(ScopedKeepAlive); | 17 DISALLOW_COPY_AND_ASSIGN(ScopedKeepAlive); |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 class KeepAliveServiceImpl : public KeepAliveService { | 20 class KeepAliveServiceImpl : public KeepAliveService { |
| 21 public: | 21 public: |
| 22 KeepAliveServiceImpl(); | 22 KeepAliveServiceImpl(); |
| 23 virtual ~KeepAliveServiceImpl(); | 23 virtual ~KeepAliveServiceImpl(); |
| 24 | 24 |
| 25 // KeepAliveServiceImpl overrides. | 25 // KeepAliveServiceImpl overrides. |
| 26 virtual void EnsureKeepAlive(); | 26 virtual void EnsureKeepAlive() OVERRIDE; |
| 27 virtual void FreeKeepAlive(); | 27 virtual void FreeKeepAlive() OVERRIDE; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Used to keep the browser process alive while the app list is visible. | 30 // Used to keep the browser process alive while the app list is visible. |
| 31 scoped_ptr<ScopedKeepAlive> keep_alive_; | 31 scoped_ptr<ScopedKeepAlive> keep_alive_; |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(KeepAliveServiceImpl); | 33 DISALLOW_COPY_AND_ASSIGN(KeepAliveServiceImpl); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 | 36 |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ | 38 #endif // CHROME_BROWSER_UI_APP_LIST_KEEP_ALIVE_SERVICE_IMPL_H_ |
| OLD | NEW |