Commit ec94b4ae authored by mirandac@chromium.org's avatar mirandac@chromium.org

Revert 19829.

BUG= http://crbug.com/1455

Review URL: http://codereview.chromium.org/149156

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19861 0039d316-1c4b-4281-b951-d872f2087c98
parent 4871b241
...@@ -25,7 +25,6 @@ class StatusBubbleMac : public StatusBubble { ...@@ -25,7 +25,6 @@ class StatusBubbleMac : public StatusBubble {
virtual void Hide(); virtual void Hide();
virtual void MouseMoved(); virtual void MouseMoved();
virtual void UpdateDownloadShelfVisibility(bool visible); virtual void UpdateDownloadShelfVisibility(bool visible);
virtual void SetBubbleWidth(int width);
private: private:
friend class StatusBubbleMacTest; friend class StatusBubbleMacTest;
......
...@@ -192,10 +192,6 @@ void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) { ...@@ -192,10 +192,6 @@ void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
} }
void StatusBubbleMac::SetBubbleWidth(int width) {
NOTIMPLEMENTED();
}
void StatusBubbleMac::Create() { void StatusBubbleMac::Create() {
if (window_) if (window_)
return; return;
......
...@@ -36,10 +36,6 @@ class StatusBubbleGtk : public StatusBubble { ...@@ -36,10 +36,6 @@ class StatusBubbleGtk : public StatusBubble {
// the download shelf, when it is visible. // the download shelf, when it is visible.
virtual void UpdateDownloadShelfVisibility(bool visible) { } virtual void UpdateDownloadShelfVisibility(bool visible) { }
virtual void SetBubbleWidth(int width) { }
void SetStatus(const std::string& status_utf8);
// Top of the widget hierarchy for a StatusBubble. This top level widget is // Top of the widget hierarchy for a StatusBubble. This top level widget is
// guarenteed to have its gtk_widget_name set to "status-bubble" for // guarenteed to have its gtk_widget_name set to "status-bubble" for
// identification. // identification.
......
...@@ -44,9 +44,6 @@ class StatusBubble { ...@@ -44,9 +44,6 @@ class StatusBubble {
// This is used by to ensure that the status bubble does not obscure // This is used by to ensure that the status bubble does not obscure
// the download shelf, when it is visible. // the download shelf, when it is visible.
virtual void UpdateDownloadShelfVisibility(bool visible) = 0; virtual void UpdateDownloadShelfVisibility(bool visible) = 0;
// Allow StatusView animation to set width of StatusBubble.
virtual void SetBubbleWidth(int width) = 0;
}; };
#endif // #ifndef CHROME_BROWSER_STATUS_BUBBLE_H_ #endif // #ifndef CHROME_BROWSER_STATUS_BUBBLE_H_
This diff is collapsed.
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
#include "base/gfx/rect.h" #include "base/gfx/rect.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/scoped_ptr.h" #include "base/scoped_ptr.h"
#include "base/task.h"
#include "chrome/browser/status_bubble.h" #include "chrome/browser/status_bubble.h"
#include "googleurl/src/gurl.h"
class GURL; class GURL;
namespace views { namespace views {
...@@ -28,9 +26,6 @@ class StatusBubbleViews : public StatusBubble { ...@@ -28,9 +26,6 @@ class StatusBubbleViews : public StatusBubble {
// The combined vertical padding above and below the text. // The combined vertical padding above and below the text.
static const int kTotalVerticalPadding = 7; static const int kTotalVerticalPadding = 7;
// On hover, expand status bubble to accommodate long URL after this delay.
static const int kExpandHoverDelay = 2000;
explicit StatusBubbleViews(views::Widget* frame); explicit StatusBubbleViews(views::Widget* frame);
~StatusBubbleViews(); ~StatusBubbleViews();
...@@ -45,9 +40,6 @@ class StatusBubbleViews : public StatusBubble { ...@@ -45,9 +40,6 @@ class StatusBubbleViews : public StatusBubble {
// Set the bounds of the bubble relative to the browser window. // Set the bounds of the bubble relative to the browser window.
void SetBounds(int x, int y, int w, int h); void SetBounds(int x, int y, int w, int h);
// Set bubble to new width; for animation of expansion.
void SetBubbleWidth(int width);
// Overridden from StatusBubble: // Overridden from StatusBubble:
virtual void SetStatus(const std::wstring& status); virtual void SetStatus(const std::wstring& status);
virtual void SetURL(const GURL& url, const std::wstring& languages); virtual void SetURL(const GURL& url, const std::wstring& languages);
...@@ -57,7 +49,6 @@ class StatusBubbleViews : public StatusBubble { ...@@ -57,7 +49,6 @@ class StatusBubbleViews : public StatusBubble {
private: private:
class StatusView; class StatusView;
class StatusViewExpander;
// Initializes the popup and view. // Initializes the popup and view.
void Init(); void Init();
...@@ -66,34 +57,12 @@ class StatusBubbleViews : public StatusBubble { ...@@ -66,34 +57,12 @@ class StatusBubbleViews : public StatusBubble {
// users to see links in the region normally occupied by the status bubble. // users to see links in the region normally occupied by the status bubble.
void AvoidMouse(); void AvoidMouse();
// Expand bubble size to accommodate an abridged URL.
void ExpandBubble();
// Cancel all the expansions waiting in the timer.
void CancelExpandTimer();
// Get the standard width for a status bubble in the current frame size.
int GetStandardStatusBubbleWidth();
// Get the maximum possible width for a status bubble in the current
// frame size.
int GetMaxStatusBubbleWidth();
// The status text we want to display when there are no URLs to display. // The status text we want to display when there are no URLs to display.
std::wstring status_text_; std::wstring status_text_;
// The url we want to display when there is no status text to display. // The url we want to display when there is no status text to display.
// This string may be elided if the URL is too long to fit in status bubble.
std::wstring url_text_; std::wstring url_text_;
// The original url. We need to keep this around to we can re-elide it to
// dynamically fit the bubble if we need to expand it to show a url that
// has been cut off.
GURL url_;
// Keep this around so we can elide the original url when we expand it.
std::wstring languages_;
// Position relative to the parent window. // Position relative to the parent window.
gfx::Point position_; gfx::Point position_;
gfx::Size size_; gfx::Size size_;
...@@ -108,17 +77,10 @@ class StatusBubbleViews : public StatusBubble { ...@@ -108,17 +77,10 @@ class StatusBubbleViews : public StatusBubble {
views::Widget* frame_; views::Widget* frame_;
StatusView* view_; StatusView* view_;
StatusViewExpander* expand_view_;
// If the download shelf is visible, do not obscure it. // If the download shelf is visible, do not obscure it.
bool download_shelf_is_visible_; bool download_shelf_is_visible_;
// Is the bubble expanded? If so, change size immediately.
bool is_expanded_;
// Times expansion of status bubble when URL is too long for standard width.
ScopedRunnableMethodFactory<StatusBubbleViews> expand_timer_factory_;
DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment