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

Unified Diff: chrome/browser/extensions/extension_popup_api.cc

Issue 3129003: remove toolstrips (Closed)
Patch Set: merge Created 10 years, 4 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/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_popup_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_popup_api.cc
diff --git a/chrome/browser/extensions/extension_popup_api.cc b/chrome/browser/extensions/extension_popup_api.cc
index 1d3c3c7ba8b8d30f70d9724ec034d24aceceb459..855dfa141eb8ed10b0603eb2ddeb3a73ae5d456f 100644
--- a/chrome/browser/extensions/extension_popup_api.cc
+++ b/chrome/browser/extensions/extension_popup_api.cc
@@ -45,7 +45,7 @@ const char kBadAnchorArgument[] = "Invalid anchor argument.";
const char kInvalidURLError[] = "Invalid URL.";
const char kNotAnExtension[] = "Not an extension view.";
const char kPopupsDisallowed[] =
- "Popups are only supported from toolstrip or tab-contents views.";
+ "Popups are only supported from tab-contents views.";
// Keys.
const wchar_t kUrlKey[] = L"url";
@@ -356,12 +356,10 @@ void PopupShowFunction::Run() {
}
bool PopupShowFunction::RunImpl() {
- // Popups may only be displayed from TAB_CONTENTS and EXTENSION_TOOLSTRIP
- // views.
+ // Popups may only be displayed from TAB_CONTENTS.
ViewType::Type view_type =
dispatcher()->render_view_host()->delegate()->GetRenderViewType();
- if (ViewType::EXTENSION_TOOLSTRIP != view_type &&
- ViewType::TAB_CONTENTS != view_type) {
+ if (ViewType::TAB_CONTENTS != view_type) {
error_ = kPopupsDisallowed;
return false;
}
@@ -444,11 +442,7 @@ bool PopupShowFunction::RunImpl() {
window = GetCurrentBrowser()->window()->GetNativeHandle();
#if defined(TOOLKIT_VIEWS)
- // Pop-up from extension views (ExtensionShelf, etc.), and drop-down when
- // in a TabContents view.
- BubbleBorder::ArrowLocation arrow_location =
- view_type == ViewType::TAB_CONTENTS ?
- BubbleBorder::TOP_LEFT : BubbleBorder::BOTTOM_LEFT;
+ BubbleBorder::ArrowLocation arrow_location = BubbleBorder::TOP_LEFT;
// ExtensionPopupHost manages it's own lifetime.
ExtensionPopupHost* popup_host = new ExtensionPopupHost(dispatcher());
@@ -468,6 +462,7 @@ bool PopupShowFunction::RunImpl() {
popup_->set_close_on_lost_focus(false);
popup_host->set_popup(popup_);
#endif // defined(TOOLKIT_VIEWS)
+
return true;
}
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_popup_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698