| OLD | NEW |
| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 gfx::Size GetPreferredSize(); | 48 gfx::Size GetPreferredSize(); |
| 49 | 49 |
| 50 // Calculate and set new position for status bubble. | 50 // Calculate and set new position for status bubble. |
| 51 void Reposition(); | 51 void Reposition(); |
| 52 | 52 |
| 53 // Set bubble to new width. | 53 // Set bubble to new width. |
| 54 void SetBubbleWidth(int width); | 54 void SetBubbleWidth(int width); |
| 55 | 55 |
| 56 // Overridden from StatusBubble: | 56 // Overridden from StatusBubble: |
| 57 void SetStatus(const base::string16& status) override; | 57 void SetStatus(const base::string16& status) override; |
| 58 void SetURL(const GURL& url, const std::string& languages) override; | 58 void SetURL(const GURL& url) override; |
| 59 void Hide() override; | 59 void Hide() override; |
| 60 void MouseMoved(const gfx::Point& location, bool left_content) override; | 60 void MouseMoved(const gfx::Point& location, bool left_content) override; |
| 61 void UpdateDownloadShelfVisibility(bool visible) override; | 61 void UpdateDownloadShelfVisibility(bool visible) override; |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 views::Widget* popup() { return popup_.get(); } | 64 views::Widget* popup() { return popup_.get(); } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 class StatusView; | 67 class StatusView; |
| 68 class StatusViewAnimation; | 68 class StatusViewAnimation; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 99 | 99 |
| 100 // The status text we want to display when there are no URLs to display. | 100 // The status text we want to display when there are no URLs to display. |
| 101 base::string16 status_text_; | 101 base::string16 status_text_; |
| 102 | 102 |
| 103 // The url we want to display when there is no status text to display. | 103 // The url we want to display when there is no status text to display. |
| 104 base::string16 url_text_; | 104 base::string16 url_text_; |
| 105 | 105 |
| 106 // The original, non-elided URL. | 106 // The original, non-elided URL. |
| 107 GURL url_; | 107 GURL url_; |
| 108 | 108 |
| 109 // Used to elide the original URL again when we expand it. | |
| 110 std::string languages_; | |
| 111 | |
| 112 // Position relative to the base_view_. | 109 // Position relative to the base_view_. |
| 113 gfx::Point original_position_; | 110 gfx::Point original_position_; |
| 114 // original_position_ adjusted according to the current RTL. | 111 // original_position_ adjusted according to the current RTL. |
| 115 gfx::Point position_; | 112 gfx::Point position_; |
| 116 gfx::Size size_; | 113 gfx::Size size_; |
| 117 | 114 |
| 118 // Last location passed to MouseMoved(). | 115 // Last location passed to MouseMoved(). |
| 119 gfx::Point last_mouse_moved_location_; | 116 gfx::Point last_mouse_moved_location_; |
| 120 | 117 |
| 121 // Whether the view contains the mouse. | 118 // Whether the view contains the mouse. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 141 // change size immediately, with no hover. | 138 // change size immediately, with no hover. |
| 142 bool is_expanded_; | 139 bool is_expanded_; |
| 143 | 140 |
| 144 // Times expansion of status bubble when URL is too long for standard width. | 141 // Times expansion of status bubble when URL is too long for standard width. |
| 145 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; | 142 base::WeakPtrFactory<StatusBubbleViews> expand_timer_factory_; |
| 146 | 143 |
| 147 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); | 144 DISALLOW_COPY_AND_ASSIGN(StatusBubbleViews); |
| 148 }; | 145 }; |
| 149 | 146 |
| 150 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ | 147 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_BUBBLE_VIEWS_H_ |
| OLD | NEW |