| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ | 5 #ifndef ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ |
| 6 #define ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ | 6 #define ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/content/shell_content_state.h" | 10 #include "ash/content/shell_content_state.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 class BrowserContext; | 14 class BrowserContext; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace ash { | 17 namespace ash { |
| 17 namespace test { | 18 namespace test { |
| 18 | 19 |
| 19 class TestShellContentState : public ShellContentState { | 20 class TestShellContentState : public ShellContentState { |
| 20 public: | 21 public: |
| 21 TestShellContentState(); | 22 TestShellContentState(); |
| 22 | 23 |
| 23 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 24 content::ScreenOrientationDelegate* screen_orientation_delegate() { | 25 content::ScreenOrientationDelegate* screen_orientation_delegate() { |
| 25 return &orientation_delegate_; | 26 return &orientation_delegate_; |
| 26 } | 27 } |
| 27 #endif | 28 #endif |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 ~TestShellContentState() override; | 31 ~TestShellContentState() override; |
| 31 | 32 |
| 32 // Overridden from ShellContentState: | 33 // Overridden from ShellContentState: |
| 33 content::BrowserContext* GetActiveBrowserContext() override; | 34 content::BrowserContext* GetActiveBrowserContext() override; |
| 34 content::BrowserContext* GetBrowserContextByIndex(UserIndex index) override; | 35 content::BrowserContext* GetBrowserContextByIndex(UserIndex index) override; |
| 35 content::BrowserContext* GetBrowserContextForWindow( | 36 content::BrowserContext* GetBrowserContextForWindow( |
| 36 aura::Window* window) override; | 37 aura::Window* window) override; |
| 37 content::BrowserContext* GetUserPresentingBrowserContextForWindow( | 38 content::BrowserContext* GetUserPresentingBrowserContextForWindow( |
| 38 aura::Window* window) override; | 39 aura::Window* window) override; |
| 39 | 40 |
| 40 scoped_ptr<content::BrowserContext> active_browser_context_; | 41 std::unique_ptr<content::BrowserContext> active_browser_context_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(TestShellContentState); | 43 DISALLOW_COPY_AND_ASSIGN(TestShellContentState); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace test | 46 } // namespace test |
| 46 } // namespace ash | 47 } // namespace ash |
| 47 | 48 |
| 48 #endif // ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ | 49 #endif // ASH_TEST_CONTENT_TEST_SHELL_CONTENT_STATE_H_ |
| OLD | NEW |