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

Side by Side Diff: chrome/browser/ui/views/status_bubble_views.h

Issue 2175833002: AdjustBoundsToEnsureMinimumWindowVisibility may cause unwanted shift if window dimension is small (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 30 matching lines...) Expand all
41 views::View* base_view() { return base_view_; } 41 views::View* base_view() { return base_view_; }
42 42
43 // Reposition the bubble's popup - as we are using a WS_POPUP for the bubble, 43 // Reposition the bubble's popup - as we are using a WS_POPUP for the bubble,
44 // we have to manually position it when the browser window moves. 44 // we have to manually position it when the browser window moves.
45 void RepositionPopup(); 45 void RepositionPopup();
46 46
47 // The bubble only has a preferred height: the sum of the height of 47 // The bubble only has a preferred height: the sum of the height of
48 // the font and kTotalVerticalPadding. 48 // the font and kTotalVerticalPadding.
49 gfx::Size GetPreferredSize(); 49 gfx::Size GetPreferredSize();
50 50
51 // Calculate and set new position for status bubble.
52 void Reposition();
53
54 // Set bubble to new width. 51 // Set bubble to new width.
55 void SetBubbleWidth(int width); 52 void SetBubbleWidth(int width);
56 53
57 // Overridden from StatusBubble: 54 // Overridden from StatusBubble:
58 void SetStatus(const base::string16& status) override; 55 void SetStatus(const base::string16& status) override;
59 void SetURL(const GURL& url) override; 56 void SetURL(const GURL& url) override;
57 void Reposition() override;
60 void Hide() override; 58 void Hide() override;
61 void MouseMoved(const gfx::Point& location, bool left_content) override; 59 void MouseMoved(const gfx::Point& location, bool left_content) override;
62 void UpdateDownloadShelfVisibility(bool visible) override; 60 void UpdateDownloadShelfVisibility(bool visible) override;
63 61
64 protected: 62 protected:
65 views::Widget* popup() { return popup_.get(); } 63 views::Widget* popup() { return popup_.get(); }
66 64
67 private: 65 private:
68 class StatusView; 66 class StatusView;
69 class StatusViewAnimation; 67 class StatusViewAnimation;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // change size immediately, with no hover. 137 // change size immediately, with no hover.
140 bool is_expanded_; 138 bool is_expanded_;
141 139
142 // Times expansion of status bubble when URL is too long for standard width. 140 // Times expansion of status bubble when URL is too long for standard width.
143 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; 141 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_;
144 142
145 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); 143 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews);
146 }; 144 };
147 145
148 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ 146 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698