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

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

Issue 346006: New event style for pageAction API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_BROWSER_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const NotificationSource& source, 70 const NotificationSource& source,
71 const NotificationDetails& details); 71 const NotificationDetails& details);
72 private: 72 private:
73 // "Synthetic" event. Called from TabInsertedAt if new tab is detected. 73 // "Synthetic" event. Called from TabInsertedAt if new tab is detected.
74 void TabCreatedAt(TabContents* contents, int index, bool foreground); 74 void TabCreatedAt(TabContents* contents, int index, bool foreground);
75 75
76 // Internal processing of tab updated events. Is called by both TabChangedAt 76 // Internal processing of tab updated events. Is called by both TabChangedAt
77 // and Observe/NAV_ENTRY_COMMITTED. 77 // and Observe/NAV_ENTRY_COMMITTED.
78 void TabUpdated(TabContents* contents, bool did_navigate); 78 void TabUpdated(TabContents* contents, bool did_navigate);
79 79
80 // Called to dispatch a deprecated style page action click event that was
81 // registered like:
82 // chrome.pageActions["name"].addListener(function(actionId, info){})
83 void DispatchOldPageActionEvent(Profile* profile,
84 const std::string& extension_id,
85 const std::string& page_action_id,
86 int tab_id,
87 const std::string& url,
88 int button);
89
80 // Register ourselves to receive the various notifications we are interested 90 // Register ourselves to receive the various notifications we are interested
81 // in for a browser. 91 // in for a browser.
82 void RegisterForBrowserNotifications(const Browser* browser); 92 void RegisterForBrowserNotifications(const Browser* browser);
83 93
84 // Register ourselves to receive the various notifications we are interested 94 // Register ourselves to receive the various notifications we are interested
85 // in for a tab. 95 // in for a tab.
86 void RegisterForTabNotifications(TabContents* contents); 96 void RegisterForTabNotifications(TabContents* contents);
87 97
88 ExtensionBrowserEventRouter(); 98 ExtensionBrowserEventRouter();
89 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>; 99 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 145
136 GURL url_; 146 GURL url_;
137 }; 147 };
138 148
139 std::map<int, TabEntry> tab_entries_; 149 std::map<int, TabEntry> tab_entries_;
140 150
141 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); 151 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter);
142 }; 152 };
143 153
144 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ 154 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698