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

Unified Diff: chrome/browser/views/browser_actions_container.cc

Issue 264046: Update browser actions api to be like new design doc. (Closed)
Patch Set: rebase Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_actions_container.cc
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index d7b610d223151fe67e20baf5962606d96c90f740..1c0733fc292d6cf4d9e47a72f51481dbc3072c47 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -165,7 +165,7 @@ void BrowserActionButton::ButtonPressed(
void BrowserActionButton::OnImageLoaded(SkBitmap* image, size_t index) {
DCHECK(index < browser_action_icons_.size());
- browser_action_icons_[index] = *image;
+ browser_action_icons_[index] = image ? *image : SkBitmap();
if (index == browser_action_icons_.size() - 1) {
OnStateUpdated();
tracker_ = NULL; // The tracker object will delete itself when we return.
@@ -482,9 +482,8 @@ void BrowserActionsContainer::OnBrowserActionExecuted(
}
// Otherwise, we send the action to the extension.
- int window_id = ExtensionTabUtil::GetWindowId(toolbar_->browser());
ExtensionBrowserEventRouter::GetInstance()->BrowserActionExecuted(
- profile_, browser_action.extension_id(), window_id);
+ profile_, browser_action.extension_id(), toolbar_->browser());
}
gfx::Size BrowserActionsContainer::GetPreferredSize() {
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698