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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_action.h

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement fixes from comments and add unit tests Created 6 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 namespace extensions { 25 namespace extensions {
26 class Extension; 26 class Extension;
27 27
28 // Base class for all ContentActions of the declarative content API. 28 // Base class for all ContentActions of the declarative content API.
29 class ContentAction : public base::RefCounted<ContentAction> { 29 class ContentAction : public base::RefCounted<ContentAction> {
30 public: 30 public:
31 // Type identifiers for concrete ContentActions. 31 // Type identifiers for concrete ContentActions.
32 enum Type { 32 enum Type {
33 ACTION_SHOW_PAGE_ACTION, 33 ACTION_SHOW_PAGE_ACTION,
34 ACTION_REQUEST_CONTENT_SCRIPT,
34 }; 35 };
35 36
36 struct ApplyInfo { 37 struct ApplyInfo {
37 Profile* profile; 38 Profile* profile;
38 content::WebContents* tab; 39 content::WebContents* tab;
39 }; 40 };
40 41
41 ContentAction(); 42 ContentAction();
42 43
43 virtual Type GetType() const = 0; 44 virtual Type GetType() const = 0;
(...skipping 22 matching lines...) Expand all
66 protected: 67 protected:
67 friend class base::RefCounted<ContentAction>; 68 friend class base::RefCounted<ContentAction>;
68 virtual ~ContentAction(); 69 virtual ~ContentAction();
69 }; 70 };
70 71
71 typedef DeclarativeActionSet<ContentAction> ContentActionSet; 72 typedef DeclarativeActionSet<ContentAction> ContentActionSet;
72 73
73 } // namespace extensions 74 } // namespace extensions
74 75
75 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_ 76 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_ACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698