Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/browser/extensions/settings_api_helpers.h

Issue 219593002: Add unit test for the Settings API Bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_
6 #define CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_
7 7
8 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h" 8 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h"
9 9
10 struct AutocompleteMatch;
11 class Browser;
12 class Profile;
13
14 namespace content { 10 namespace content {
15 class BrowserContext; 11 class BrowserContext;
16 class WebContents;
17 } 12 }
18 13
19 namespace extensions { 14 namespace extensions {
20 15
21 // Shows a bubble notifying the user that the homepage is controlled by an 16 struct SettingsOverrides;
22 // extension. This bubble is shown only on the first use of the Home button
23 // after the controlling extension takes effect.
24 void MaybeShowExtensionControlledHomeNotification(Browser* browser);
25
26 // Shows a bubble notifying the user that the search engine is controlled by an
27 // extension. This bubble is shown only on the first search after the
28 // controlling extension takes effect.
29 void MaybeShowExtensionControlledSearchNotification(
30 Profile* profile,
31 content::WebContents* web_contents,
32 const AutocompleteMatch& match);
33 17
34 // Find which |extension| is overriding a particular |type| of setting. Returns 18 // Find which |extension| is overriding a particular |type| of setting. Returns
35 // the SettingsOverride object, or NULL if no |extension| is overriding that 19 // the SettingsOverride object, or NULL if no |extension| is overriding that
36 // particular setting. 20 // particular setting.
37 const extensions::SettingsOverrides* FindOverridingExtension( 21 const extensions::SettingsOverrides* FindOverridingExtension(
38 content::BrowserContext* browser_context, 22 content::BrowserContext* browser_context,
39 SettingsApiOverrideType type, 23 SettingsApiOverrideType type,
40 const Extension** extension); 24 const Extension** extension);
41 25
42 // Returns which extension is overriding the homepage in a given 26 // Returns which extension is overriding the homepage in a given
(...skipping 11 matching lines...) Expand all
54 // Returns which extension is overriding the search engine in a given 38 // Returns which extension is overriding the search engine in a given
55 // |browser_context|. |search_provider|, if non-NULL, will contain the search 39 // |browser_context|. |search_provider|, if non-NULL, will contain the search
56 // provider the extension has set. 40 // provider the extension has set.
57 const Extension* OverridesSearchEngine( 41 const Extension* OverridesSearchEngine(
58 content::BrowserContext* browser_context, 42 content::BrowserContext* browser_context,
59 api::manifest_types::ChromeSettingsOverrides::Search_provider* 43 api::manifest_types::ChromeSettingsOverrides::Search_provider*
60 search_provider); 44 search_provider);
61 45
62 } // namespace extensions 46 } // namespace extensions
63 47
64 #endif // CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ 48 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_API_HELPERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings_api_bubble_controller.cc ('k') | chrome/browser/extensions/settings_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698