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

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

Issue 1087713002: [Reland] [Extensions] Make extension message bubble factory platform-abstract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finnur's Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "extensions/common/manifest.h"
12 13
13 class Profile; 14 class Profile;
14 15
15 namespace content { 16 namespace content {
16 class WebContents; 17 class WebContents;
17 } 18 }
18 19
19 namespace extensions { 20 namespace extensions {
20 class Extension; 21 class Extension;
21 class ExtensionToolbarModel; 22 class ExtensionToolbarModel;
(...skipping 16 matching lines...) Expand all
38 39
39 // Returns the total number of page actions (visible or not) for the given 40 // Returns the total number of page actions (visible or not) for the given
40 // |web_contents|. 41 // |web_contents|.
41 size_t GetTotalPageActionCount(content::WebContents* web_contents); 42 size_t GetTotalPageActionCount(content::WebContents* web_contents);
42 43
43 // Creates and returns an extension with the given |name| with the given 44 // Creates and returns an extension with the given |name| with the given
44 // |action_type|. 45 // |action_type|.
45 // Does not add the extension to the extension service or registry. 46 // Does not add the extension to the extension service or registry.
46 scoped_refptr<const Extension> CreateActionExtension(const std::string& name, 47 scoped_refptr<const Extension> CreateActionExtension(const std::string& name,
47 ActionType action_type); 48 ActionType action_type);
49 scoped_refptr<const Extension> CreateActionExtension(
50 const std::string& name,
51 ActionType action_type,
52 Manifest::Location location);
48 53
49 // Creates a new ExtensionToolbarModel for the given |profile|, and associates 54 // Creates a new ExtensionToolbarModel for the given |profile|, and associates
50 // it with the profile as a keyed service. 55 // it with the profile as a keyed service.
51 // This should only be used in unit tests (since it assumes the existence of 56 // This should only be used in unit tests (since it assumes the existence of
52 // a TestExtensionSystem), but if running a browser test, the model should 57 // a TestExtensionSystem), but if running a browser test, the model should
53 // already be created. 58 // already be created.
54 ExtensionToolbarModel* CreateToolbarModelForProfile(Profile* profile); 59 ExtensionToolbarModel* CreateToolbarModelForProfile(Profile* profile);
55 // Like above, but doesn't run the ExtensionSystem::ready() task for the new 60 // Like above, but doesn't run the ExtensionSystem::ready() task for the new
56 // model. 61 // model.
57 ExtensionToolbarModel* CreateToolbarModelForProfileWithoutWaitingForReady( 62 ExtensionToolbarModel* CreateToolbarModelForProfileWithoutWaitingForReady(
58 Profile* profile); 63 Profile* profile);
59 64
60 } // namespace extension_action_test_util 65 } // namespace extension_action_test_util
61 } // namespace extensions 66 } // namespace extensions
62 67
63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_ 68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/dev_mode_bubble_controller.cc ('k') | chrome/browser/extensions/extension_action_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698