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

Side by Side Diff: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.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/gtk/browser_actions_toolbar_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } else { 137 } else {
138 // Window doesn't exist yet, wait for it. 138 // Window doesn't exist yet, wait for it.
139 signals_.Connect(toolbar->widget(), "realize", 139 signals_.Connect(toolbar->widget(), "realize",
140 G_CALLBACK(OnRealize), this); 140 G_CALLBACK(OnRealize), this);
141 } 141 }
142 142
143 registrar_.Add( 143 registrar_.Add(
144 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, 144 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
145 content::Source<ExtensionAction>(browser_action())); 145 content::Source<ExtensionAction>(browser_action()));
146 registrar_.Add( 146 registrar_.Add(
147 this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 147 this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
148 content::Source<Profile>( 148 content::Source<Profile>(
149 toolbar->browser()->profile()->GetOriginalProfile())); 149 toolbar->browser()->profile()->GetOriginalProfile()));
150 registrar_.Add( 150 registrar_.Add(
151 this, chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED, 151 this, chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED,
152 content::Source<Profile>( 152 content::Source<Profile>(
153 toolbar->browser()->profile()->GetOriginalProfile())); 153 toolbar->browser()->profile()->GetOriginalProfile()));
154 registrar_.Add( 154 registrar_.Add(
155 this, chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED, 155 this, chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED,
156 content::Source<Profile>( 156 content::Source<Profile>(
157 toolbar->browser()->profile()->GetOriginalProfile())); 157 toolbar->browser()->profile()->GetOriginalProfile()));
(...skipping 12 matching lines...) Expand all
170 const Extension* extension() { return extension_; } 170 const Extension* extension() { return extension_; }
171 171
172 // NotificationObserver implementation. 172 // NotificationObserver implementation.
173 virtual void Observe(int type, 173 virtual void Observe(int type,
174 const content::NotificationSource& source, 174 const content::NotificationSource& source,
175 const content::NotificationDetails& details) OVERRIDE { 175 const content::NotificationDetails& details) OVERRIDE {
176 switch (type) { 176 switch (type) {
177 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED: 177 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED:
178 UpdateState(); 178 UpdateState();
179 break; 179 break;
180 case chrome::NOTIFICATION_EXTENSION_UNLOADED: 180 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
181 case chrome::NOTIFICATION_WINDOW_CLOSED: 181 case chrome::NOTIFICATION_WINDOW_CLOSED:
182 DisconnectBrowserActionPopupAccelerator(); 182 DisconnectBrowserActionPopupAccelerator();
183 break; 183 break;
184 case chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED: 184 case chrome::NOTIFICATION_EXTENSION_COMMAND_ADDED:
185 case chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED: { 185 case chrome::NOTIFICATION_EXTENSION_COMMAND_REMOVED: {
186 std::pair<const std::string, const std::string>* payload = 186 std::pair<const std::string, const std::string>* payload =
187 content::Details<std::pair<const std::string, const std::string> >( 187 content::Details<std::pair<const std::string, const std::string> >(
188 details).ptr(); 188 details).ptr();
189 if (extension_->id() == payload->first && 189 if (extension_->id() == payload->first &&
190 payload->second == 190 payload->second ==
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1116
1117 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root), 1117 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root),
1118 event->time); 1118 event->time);
1119 return TRUE; 1119 return TRUE;
1120 } 1120 }
1121 1121
1122 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) { 1122 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) {
1123 if (!resize_animation_.is_animating()) 1123 if (!resize_animation_.is_animating())
1124 UpdateChevronVisibility(); 1124 UpdateChevronVisibility();
1125 } 1125 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_installed_bubble.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698