OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
7 #include "chrome/browser/extensions/extension_test_message_listener.h" | 7 #include "chrome/browser/extensions/extension_test_message_listener.h" |
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
9 #include "chrome/browser/extensions/shell_window_registry.h" | 9 #include "chrome/browser/extensions/shell_window_registry.h" |
10 #include "chrome/browser/ui/base_window.h" | 10 #include "chrome/browser/ui/base_window.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 explicit TestShellWindowRegistryObserver(Profile* profile) | 26 explicit TestShellWindowRegistryObserver(Profile* profile) |
27 : profile_(profile), | 27 : profile_(profile), |
28 icon_updates_(0) { | 28 icon_updates_(0) { |
29 extensions::ShellWindowRegistry::Get(profile_)->AddObserver(this); | 29 extensions::ShellWindowRegistry::Get(profile_)->AddObserver(this); |
30 } | 30 } |
31 virtual ~TestShellWindowRegistryObserver() { | 31 virtual ~TestShellWindowRegistryObserver() { |
32 extensions::ShellWindowRegistry::Get(profile_)->RemoveObserver(this); | 32 extensions::ShellWindowRegistry::Get(profile_)->RemoveObserver(this); |
33 } | 33 } |
34 | 34 |
35 // Overridden from ShellWindowRegistry::Observer: | 35 // Overridden from ShellWindowRegistry::Observer: |
36 virtual void OnShellWindowAdded(ShellWindow* shell_window) {} | 36 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE {} |
37 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) { | 37 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE { |
38 ++icon_updates_; | 38 ++icon_updates_; |
39 } | 39 } |
40 virtual void OnShellWindowRemoved(ShellWindow* shell_window) { | 40 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE { |
41 } | 41 } |
42 | 42 |
43 int icon_updates() { return icon_updates_; } | 43 int icon_updates() { return icon_updates_; } |
44 | 44 |
45 private: | 45 private: |
46 Profile* profile_; | 46 Profile* profile_; |
47 int icon_updates_; | 47 int icon_updates_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(TestShellWindowRegistryObserver); | 49 DISALLOW_COPY_AND_ASSIGN(TestShellWindowRegistryObserver); |
50 }; | 50 }; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) | 127 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) |
128 | 128 |
129 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiProperties) { | 129 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiProperties) { |
130 EXPECT_TRUE( | 130 EXPECT_TRUE( |
131 RunExtensionTest("platform_apps/windows_api_properties")) << message_; | 131 RunExtensionTest("platform_apps/windows_api_properties")) << message_; |
132 } | 132 } |
133 | 133 |
134 #endif // defined(TOOLKIT_VIEWS) | 134 #endif // defined(TOOLKIT_VIEWS) |
135 | 135 |
136 } // namespace extensions | 136 } // namespace extensions |
OLD | NEW |