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

Unified Diff: chrome/browser/cocoa/status_bubble_mac.h

Issue 3437002: Make status bubble expand on Mac to fit URLs longer than the standard width.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « no previous file | chrome/browser/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/status_bubble_mac.h
===================================================================
--- chrome/browser/cocoa/status_bubble_mac.h (revision 59308)
+++ chrome/browser/cocoa/status_bubble_mac.h (working copy)
@@ -14,6 +14,7 @@
#include "base/string16.h"
#include "base/task.h"
#include "chrome/browser/status_bubble.h"
+#include "googleurl/src/gurl.h"
class GURL;
class StatusBubbleMacTest;
@@ -55,6 +56,9 @@
// delegate, which is an Objective-C object.
void AnimationDidStop(CAAnimation* animation, bool finished);
+ // Expand the bubble to fit a URL too long for the standard bubble size.
+ void ExpandBubble();
+
private:
friend class StatusBubbleMacTest;
@@ -103,12 +107,19 @@
void StartShowing();
void StartHiding();
+ // Cancel the expansion timer.
+ void CancelExpandTimer();
+
// The timer factory used for show and hide delay timers.
ScopedRunnableMethodFactory<StatusBubbleMac> timer_factory_;
- // Calculate the appropriate frame for the status bubble window.
- NSRect CalculateWindowFrame();
+ // The timer factory used for the expansion delay timer.
+ ScopedRunnableMethodFactory<StatusBubbleMac> expand_timer_factory_;
+ // Calculate the appropriate frame for the status bubble window. If
+ // |expanded_width|, use entire width of parent frame.
+ NSRect CalculateWindowFrame(bool expanded_width);
+
// The window we attach ourselves to.
NSWindow* parent_; // WEAK
@@ -133,6 +144,18 @@
// true for testing.
bool immediate_;
+ // True if the status bubble has been expanded. If the bubble is in the
+ // expanded state and encounters a new URL, change size immediately,
+ // with no hover delay.
+ bool is_expanded_;
+
+ // The original, non-elided URL.
+ GURL url_;
+
+ // Needs to be passed to ElideURL if the original URL string is wider than
+ // the standard bubble width.
+ string16 languages_;
+
DISALLOW_COPY_AND_ASSIGN(StatusBubbleMac);
};
« no previous file with comments | « no previous file | chrome/browser/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698