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

Unified Diff: chrome/browser/views/extensions/extension_popup.h

Issue 454019: Addition of optional giveFocus parameter to experimental.popup.show(...) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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
Index: chrome/browser/views/extensions/extension_popup.h
===================================================================
--- chrome/browser/views/extensions/extension_popup.h (revision 33889)
+++ chrome/browser/views/extensions/extension_popup.h (working copy)
@@ -29,18 +29,20 @@
// by value of |arrow_location| remains fixed during popup resizes.
// If |arrow_location| is BOTTOM_*, then the popup 'pops up', otherwise
// the popup 'drops down'.
+ // Pass |activate_on_show| as true to activate the popup window.
//
// The actual display of the popup is delayed until the page contents
// finish loading in order to minimize UI flashing and resizing.
static ExtensionPopup* Show(const GURL& url, Browser* browser,
const gfx::Rect& relative_to,
- BubbleBorder::ArrowLocation arrow_location);
+ BubbleBorder::ArrowLocation arrow_location,
+ bool activate_on_show);
ExtensionHost* host() const { return extension_host_.get(); }
// BrowserBubble overrides.
virtual void Hide();
- virtual void Show();
+ virtual void Show(bool activate);
virtual void ResizeToView();
// NotificationObserver overrides.
@@ -63,7 +65,8 @@
ExtensionPopup(ExtensionHost* host,
views::Widget* frame,
const gfx::Rect& relative_to,
- BubbleBorder::ArrowLocation);
+ BubbleBorder::ArrowLocation arrow_location,
+ bool activate_on_show);
// The area on the screen that the popup should be positioned relative to.
gfx::Rect relative_to_;
@@ -71,6 +74,9 @@
// The contained host for the view.
scoped_ptr<ExtensionHost> extension_host_;
+ // Flag used to indicate if the pop-up should be activated upon first display.
+ bool activate_on_show_;
+
NotificationRegistrar registrar_;
// A separate widget and associated pieces to draw a border behind the

Powered by Google App Engine
This is Rietveld 408576698