OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Shows the Translate bubble. | 44 // Shows the Translate bubble. |
45 // | 45 // |
46 // |is_user_gesture| is true when the bubble is shown on the user's delibarate | 46 // |is_user_gesture| is true when the bubble is shown on the user's delibarate |
47 // action. | 47 // action. |
48 static void ShowBubble(views::View* anchor_view, | 48 static void ShowBubble(views::View* anchor_view, |
49 content::WebContents* web_contents, | 49 content::WebContents* web_contents, |
50 translate::TranslateStep step, | 50 translate::TranslateStep step, |
51 translate::TranslateErrors::Type error_type, | 51 translate::TranslateErrors::Type error_type, |
52 bool is_user_gesture); | 52 bool is_user_gesture); |
53 | 53 |
| 54 // Closes the current bubble if existing. |
| 55 static void CloseBubble(); |
| 56 |
54 // If true, the Translate bubble is being shown. | 57 // If true, the Translate bubble is being shown. |
55 static bool IsShowing(); | 58 static bool IsShowing(); |
56 | 59 |
57 // Returns the bubble view currently shown. This may return NULL. | 60 // Returns the bubble view currently shown. This may return NULL. |
58 static TranslateBubbleView* GetCurrentBubble(); | 61 static TranslateBubbleView* GetCurrentBubble(); |
59 | 62 |
60 TranslateBubbleModel* model() { return model_.get(); } | 63 TranslateBubbleModel* model() { return model_.get(); } |
61 | 64 |
62 // views::BubbleDelegateView methods. | 65 // views::BubbleDelegateView methods. |
63 virtual void Init() OVERRIDE; | 66 virtual void Init() OVERRIDE; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // Whether the translation is acutually executed. | 203 // Whether the translation is acutually executed. |
201 bool translate_executed_; | 204 bool translate_executed_; |
202 | 205 |
203 // Whether one of denial buttons is clicked. | 206 // Whether one of denial buttons is clicked. |
204 bool denial_button_clicked_; | 207 bool denial_button_clicked_; |
205 | 208 |
206 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 209 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
207 }; | 210 }; |
208 | 211 |
209 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 212 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
OLD | NEW |