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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 204703002: Rename NOTIFICATION_EXTENSION_UNLOADED to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: maybe upload wont do something bizarre this time Created 6 years, 9 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) 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 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 : profile_(Profile::FromBrowserContext(context)) { 169 : profile_(Profile::FromBrowserContext(context)) {
170 RegisterNotifications(); 170 RegisterNotifications();
171 } 171 }
172 172
173 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile) 173 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile)
174 : profile_(profile) { 174 : profile_(profile) {
175 int types[] = { 175 int types[] = {
176 chrome::NOTIFICATION_EXTENSION_INSTALLED, 176 chrome::NOTIFICATION_EXTENSION_INSTALLED,
177 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 177 chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
178 chrome::NOTIFICATION_EXTENSION_LOADED, 178 chrome::NOTIFICATION_EXTENSION_LOADED,
179 chrome::NOTIFICATION_EXTENSION_UNLOADED, 179 chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
180 chrome::NOTIFICATION_EXTENSION_VIEW_REGISTERED, 180 chrome::NOTIFICATION_EXTENSION_VIEW_REGISTERED,
181 chrome::NOTIFICATION_EXTENSION_VIEW_UNREGISTERED 181 chrome::NOTIFICATION_EXTENSION_VIEW_UNREGISTERED
182 }; 182 };
183 183
184 CHECK(registrar_.IsEmpty()); 184 CHECK(registrar_.IsEmpty());
185 for (size_t i = 0; i < arraysize(types); ++i) { 185 for (size_t i = 0; i < arraysize(types); ++i) {
186 registrar_.Add(this, 186 registrar_.Add(this,
187 types[i], 187 types[i],
188 content::Source<Profile>(profile_)); 188 content::Source<Profile>(profile_));
189 } 189 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 content::Details<const InstalledExtensionInfo>(details)->extension; 223 content::Details<const InstalledExtensionInfo>(details)->extension;
224 break; 224 break;
225 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 225 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
226 event_data.event_type = developer::EVENT_TYPE_UNINSTALLED; 226 event_data.event_type = developer::EVENT_TYPE_UNINSTALLED;
227 extension = content::Details<const Extension>(details).ptr(); 227 extension = content::Details<const Extension>(details).ptr();
228 break; 228 break;
229 case chrome::NOTIFICATION_EXTENSION_LOADED: 229 case chrome::NOTIFICATION_EXTENSION_LOADED:
230 event_data.event_type = developer::EVENT_TYPE_LOADED; 230 event_data.event_type = developer::EVENT_TYPE_LOADED;
231 extension = content::Details<const Extension>(details).ptr(); 231 extension = content::Details<const Extension>(details).ptr();
232 break; 232 break;
233 case chrome::NOTIFICATION_EXTENSION_UNLOADED: 233 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
234 event_data.event_type = developer::EVENT_TYPE_UNLOADED; 234 event_data.event_type = developer::EVENT_TYPE_UNLOADED;
235 extension = 235 extension =
236 content::Details<const UnloadedExtensionInfo>(details)->extension; 236 content::Details<const UnloadedExtensionInfo>(details)->extension;
237 break; 237 break;
238 case chrome::NOTIFICATION_EXTENSION_VIEW_UNREGISTERED: 238 case chrome::NOTIFICATION_EXTENSION_VIEW_UNREGISTERED:
239 event_data.event_type = developer::EVENT_TYPE_VIEW_UNREGISTERED; 239 event_data.event_type = developer::EVENT_TYPE_VIEW_UNREGISTERED;
240 event_data.item_id = GetExtensionID( 240 event_data.item_id = GetExtensionID(
241 content::Details<const RenderViewHost>(details).ptr()); 241 content::Details<const RenderViewHost>(details).ptr());
242 break; 242 break;
243 case chrome::NOTIFICATION_EXTENSION_VIEW_REGISTERED: 243 case chrome::NOTIFICATION_EXTENSION_VIEW_REGISTERED:
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 } 1358 }
1359 1359
1360 error_ui_util::HandleOpenDevTools(dict); 1360 error_ui_util::HandleOpenDevTools(dict);
1361 1361
1362 return true; 1362 return true;
1363 } 1363 }
1364 1364
1365 } // namespace api 1365 } // namespace api
1366 1366
1367 } // namespace extensions 1367 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698