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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.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/ui/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 break; 600 break;
601 case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: { 601 case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: {
602 content::RenderWidgetHost* rwh = 602 content::RenderWidgetHost* rwh =
603 content::Source<content::RenderWidgetHost>(source).ptr(); 603 content::Source<content::RenderWidgetHost>(source).ptr();
604 deleting_rwh_id_ = rwh->GetRoutingID(); 604 deleting_rwh_id_ = rwh->GetRoutingID();
605 deleting_rph_id_ = rwh->GetProcess()->GetID(); 605 deleting_rph_id_ = rwh->GetProcess()->GetID();
606 MaybeUpdateAfterNotification(); 606 MaybeUpdateAfterNotification();
607 break; 607 break;
608 } 608 }
609 case chrome::NOTIFICATION_EXTENSION_LOADED: 609 case chrome::NOTIFICATION_EXTENSION_LOADED:
610 case chrome::NOTIFICATION_EXTENSION_UNLOADED: 610 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
611 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 611 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
612 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: 612 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED:
613 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: 613 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED:
614 MaybeUpdateAfterNotification(); 614 MaybeUpdateAfterNotification();
615 break; 615 break;
616 case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED: 616 case chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED:
617 // This notification is sent when the extension host destruction begins, 617 // This notification is sent when the extension host destruction begins,
618 // not when it finishes. We use PostTask to delay the update until after 618 // not when it finishes. We use PostTask to delay the update until after
619 // the destruction finishes. 619 // the destruction finishes.
620 base::MessageLoop::current()->PostTask( 620 base::MessageLoop::current()->PostTask(
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 void ExtensionSettingsHandler::MaybeRegisterForNotifications() { 1060 void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
1061 if (registered_for_notifications_) 1061 if (registered_for_notifications_)
1062 return; 1062 return;
1063 1063
1064 registered_for_notifications_ = true; 1064 registered_for_notifications_ = true;
1065 Profile* profile = Profile::FromWebUI(web_ui()); 1065 Profile* profile = Profile::FromWebUI(web_ui());
1066 1066
1067 // Register for notifications that we need to reload the page. 1067 // Register for notifications that we need to reload the page.
1068 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 1068 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
1069 content::Source<Profile>(profile)); 1069 content::Source<Profile>(profile));
1070 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 1070 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
1071 content::Source<Profile>(profile)); 1071 content::Source<Profile>(profile));
1072 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 1072 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
1073 content::Source<Profile>(profile)); 1073 content::Source<Profile>(profile));
1074 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, 1074 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
1075 content::Source<Profile>(profile)); 1075 content::Source<Profile>(profile));
1076 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 1076 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
1077 content::NotificationService::AllBrowserContextsAndSources()); 1077 content::NotificationService::AllBrowserContextsAndSources());
1078 registrar_.Add(this, 1078 registrar_.Add(this,
1079 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, 1079 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
1080 content::NotificationService::AllBrowserContextsAndSources()); 1080 content::NotificationService::AllBrowserContextsAndSources());
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 extension_service_->EnableExtension(extension_id); 1248 extension_service_->EnableExtension(extension_id);
1249 } else { 1249 } else {
1250 ExtensionErrorReporter::GetInstance()->ReportError( 1250 ExtensionErrorReporter::GetInstance()->ReportError(
1251 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1251 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1252 true /* be noisy */); 1252 true /* be noisy */);
1253 } 1253 }
1254 requirements_checker_.reset(); 1254 requirements_checker_.reset();
1255 } 1255 }
1256 1256
1257 } // namespace extensions 1257 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/command_handler.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698