| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/background/background_mode_manager.h" | 9 #include "chrome/browser/background/background_mode_manager.h" |
| 10 #include "chrome/browser/browser_shutdown.h" | 10 #include "chrome/browser/browser_shutdown.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 int profile_app_count_; | 113 int profile_app_count_; |
| 114 | 114 |
| 115 // Flags to track whether we are launching on startup/have a status tray. | 115 // Flags to track whether we are launching on startup/have a status tray. |
| 116 bool have_status_tray_; | 116 bool have_status_tray_; |
| 117 bool launch_on_startup_; | 117 bool launch_on_startup_; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 class TestStatusIcon : public StatusIcon { | 120 class TestStatusIcon : public StatusIcon { |
| 121 virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {} | 121 virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {} |
| 122 virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {} | 122 virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {} |
| 123 virtual void SetToolTip(const string16& tool_tip) OVERRIDE {} | 123 virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {} |
| 124 virtual void DisplayBalloon(const gfx::ImageSkia& icon, | 124 virtual void DisplayBalloon(const gfx::ImageSkia& icon, |
| 125 const string16& title, | 125 const base::string16& title, |
| 126 const string16& contents) OVERRIDE {} | 126 const base::string16& contents) OVERRIDE {} |
| 127 virtual void UpdatePlatformContextMenu( | 127 virtual void UpdatePlatformContextMenu( |
| 128 StatusIconMenuModel* menu) OVERRIDE {} | 128 StatusIconMenuModel* menu) OVERRIDE {} |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 static void AssertBackgroundModeActive( | 131 static void AssertBackgroundModeActive( |
| 132 const TestBackgroundModeManager& manager) { | 132 const TestBackgroundModeManager& manager) { |
| 133 EXPECT_TRUE(chrome::WillKeepAlive()); | 133 EXPECT_TRUE(chrome::WillKeepAlive()); |
| 134 EXPECT_TRUE(manager.HaveStatusTray()); | 134 EXPECT_TRUE(manager.HaveStatusTray()); |
| 135 EXPECT_TRUE(manager.IsLaunchOnStartup()); | 135 EXPECT_TRUE(manager.IsLaunchOnStartup()); |
| 136 } | 136 } |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 // before tearing down the Message Center. | 755 // before tearing down the Message Center. |
| 756 profile_manager.reset(); | 756 profile_manager.reset(); |
| 757 | 757 |
| 758 // Message Center shutdown must occur after the EndKeepAlive because | 758 // Message Center shutdown must occur after the EndKeepAlive because |
| 759 // EndKeepAlive will end up referencing the message center during cleanup. | 759 // EndKeepAlive will end up referencing the message center during cleanup. |
| 760 message_center::MessageCenter::Shutdown(); | 760 message_center::MessageCenter::Shutdown(); |
| 761 | 761 |
| 762 // Clear the shutdown flag to isolate the remaining effect of this test. | 762 // Clear the shutdown flag to isolate the remaining effect of this test. |
| 763 browser_shutdown::SetTryingToQuit(false); | 763 browser_shutdown::SetTryingToQuit(false); |
| 764 } | 764 } |
| OLD | NEW |