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

Unified Diff: chrome/browser/ui/panels/panel_browser_frame_view.cc

Issue 7838018: Fix crash or hang on Windows when clicking on wrench icon in panel opened from non-extension domain. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/ui/panels/panel_browser_frame_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_frame_view.cc
===================================================================
--- chrome/browser/ui/panels/panel_browser_frame_view.cc (revision 99880)
+++ chrome/browser/ui/panels/panel_browser_frame_view.cc (working copy)
@@ -438,7 +438,8 @@
}
void PanelBrowserFrameView::RunMenu(View* source, const gfx::Point& pt) {
- EnsureSettingsMenuCreated();
+ if (!EnsureSettingsMenuCreated())
+ return;
DCHECK_EQ(settings_button_, source);
gfx::Point screen_point;
@@ -737,13 +738,13 @@
return Panel::GetExtension(browser_view_->browser());
}
-void PanelBrowserFrameView::EnsureSettingsMenuCreated() {
+bool PanelBrowserFrameView::EnsureSettingsMenuCreated() {
if (settings_menu_contents_.GetItemCount())
- return;
+ return true;
const Extension* extension = GetExtension();
if (!extension)
- return;
+ return false;
settings_menu_contents_.AddItem(
COMMAND_NAME, UTF8ToUTF16(extension->name()));
@@ -759,4 +760,5 @@
COMMAND_MANAGE, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS));
settings_menu_adapter_.BuildMenu(settings_menu_);
+ return true;
}
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698