OLD | NEW |
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_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ |
7 | 7 |
8 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.
h" | |
9 | |
10 struct AutocompleteMatch; | 8 struct AutocompleteMatch; |
11 class Browser; | 9 class Browser; |
12 class Profile; | 10 class Profile; |
13 | 11 |
14 namespace content { | 12 namespace content { |
15 class BrowserContext; | |
16 class WebContents; | 13 class WebContents; |
17 } | 14 } |
18 | 15 |
19 namespace extensions { | 16 namespace extensions { |
20 | 17 |
21 // Shows a bubble notifying the user that the homepage is controlled by an | 18 // Shows a bubble notifying the user that the homepage is controlled by an |
22 // extension. This bubble is shown only on the first use of the Home button | 19 // extension. This bubble is shown only on the first use of the Home button |
23 // after the controlling extension takes effect. | 20 // after the controlling extension takes effect. |
24 void MaybeShowExtensionControlledHomeNotification(Browser* browser); | 21 void MaybeShowExtensionControlledHomeNotification(Browser* browser); |
25 | 22 |
26 // Shows a bubble notifying the user that the search engine is controlled by an | 23 // 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 | 24 // extension. This bubble is shown only on the first search after the |
28 // controlling extension takes effect. | 25 // controlling extension takes effect. |
29 void MaybeShowExtensionControlledSearchNotification( | 26 void MaybeShowExtensionControlledSearchNotification( |
30 Profile* profile, | 27 Profile* profile, |
31 content::WebContents* web_contents, | 28 content::WebContents* web_contents, |
32 const AutocompleteMatch& match); | 29 const AutocompleteMatch& match); |
33 | 30 |
34 // Find which |extension| is overriding a particular |type| of setting. Returns | |
35 // the SettingsOverride object, or NULL if no |extension| is overriding that | |
36 // particular setting. | |
37 const extensions::SettingsOverrides* FindOverridingExtension( | |
38 content::BrowserContext* browser_context, | |
39 SettingsApiOverrideType type, | |
40 const Extension** extension); | |
41 | |
42 // Returns which extension is overriding the homepage in a given | |
43 // |browser_context|. |home_page_url|, if non-NULL, will contain the home_page | |
44 // value the extension has set. | |
45 const Extension* OverridesHomepage(content::BrowserContext* browser_context, | |
46 GURL* home_page_url); | |
47 | |
48 // Returns which extension is overriding the homepage in a given | |
49 // |browser_context|. |startup_pages|, if non-NULL, will contain the vector of | |
50 // startup page URLs the extension has set. | |
51 const Extension* OverridesStartupPages(content::BrowserContext* browser_context, | |
52 std::vector<GURL>* startup_pages); | |
53 | |
54 // Returns which extension is overriding the search engine in a given | |
55 // |browser_context|. |search_provider|, if non-NULL, will contain the search | |
56 // provider the extension has set. | |
57 const Extension* OverridesSearchEngine( | |
58 content::BrowserContext* browser_context, | |
59 api::manifest_types::ChromeSettingsOverrides::Search_provider* | |
60 search_provider); | |
61 | |
62 } // namespace extensions | 31 } // namespace extensions |
63 | 32 |
64 #endif // CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ | 33 #endif // CHROME_BROWSER_UI_VIEWS_SETTINGS_API_BUBBLE_HELPER_VIEWS_H_ |
OLD | NEW |