15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string> 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/basictypes.h" 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/compiler_specific.h" 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/sync/test/integration/sync_test.h" 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Profile; 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace themes_helper { 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Gets the unique ID of the custom theme with the given index. 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)std::string GetCustomTheme(int index) WARN_UNUSED_RESULT; 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Gets the ID of |profile|'s theme. 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)std::string GetThemeID(Profile* profile) WARN_UNUSED_RESULT; 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true iff |profile| is using a custom theme. 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool UsingCustomTheme(Profile* profile) WARN_UNUSED_RESULT; 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true iff |profile| is using the default theme. 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool UsingDefaultTheme(Profile* profile) WARN_UNUSED_RESULT; 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true iff |profile| is using the native theme. 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool UsingNativeTheme(Profile* profile) WARN_UNUSED_RESULT; 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true iff a theme with the given ID is pending install in 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |profile|. 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool ThemeIsPendingInstall( 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Profile* profile, const std::string& id) WARN_UNUSED_RESULT; 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true iff |profile|'s current theme is the given 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// custom theme or if the given theme is pending install. 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)bool HasOrWillHaveCustomTheme( 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Profile* profile, const std::string& id) WARN_UNUSED_RESULT; 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Sets |profile| to use the custom theme with the given index. 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void UseCustomTheme(Profile* profile, int index); 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Sets |profile| to use the default theme. 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void UseDefaultTheme(Profile* profile); 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Sets |profile| to use the native theme. 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void UseNativeTheme(Profile* profile); 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace themes_helper 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_ 55