| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Shows the Translate bubble. | 42 // Shows the Translate bubble. |
| 43 static void ShowBubble(views::View* anchor_view, | 43 static void ShowBubble(views::View* anchor_view, |
| 44 content::WebContents* web_contents, | 44 content::WebContents* web_contents, |
| 45 TranslateBubbleModel::ViewState type, | 45 TranslateBubbleModel::ViewState type, |
| 46 Browser* browser); | 46 Browser* browser); |
| 47 | 47 |
| 48 // If true, the Translate bubble is being shown. | 48 // If true, the Translate bubble is being shown. |
| 49 static bool IsShowing(); | 49 static bool IsShowing(); |
| 50 | 50 |
| 51 // Returns the bubble view currently shown. This may return NULL. |
| 52 static TranslateBubbleView* GetCurrentBubble(); |
| 53 |
| 54 TranslateBubbleModel* model() { return model_.get(); } |
| 55 |
| 51 // views::BubbleDelegateView methods. | 56 // views::BubbleDelegateView methods. |
| 52 virtual void Init() OVERRIDE; | 57 virtual void Init() OVERRIDE; |
| 53 virtual void ButtonPressed(views::Button* sender, | 58 virtual void ButtonPressed(views::Button* sender, |
| 54 const ui::Event& event) OVERRIDE; | 59 const ui::Event& event) OVERRIDE; |
| 55 | 60 |
| 56 // views::WidgetDelegate method. | 61 // views::WidgetDelegate method. |
| 57 virtual void WindowClosing() OVERRIDE; | 62 virtual void WindowClosing() OVERRIDE; |
| 58 | 63 |
| 59 // views::View methods. | 64 // views::View methods. |
| 60 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 65 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // The browser to open the help URL into a new tab. | 172 // The browser to open the help URL into a new tab. |
| 168 Browser* browser_; | 173 Browser* browser_; |
| 169 | 174 |
| 170 // Whether the translation is acutually executed. | 175 // Whether the translation is acutually executed. |
| 171 bool translate_executed_; | 176 bool translate_executed_; |
| 172 | 177 |
| 173 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 178 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
| 174 }; | 179 }; |
| 175 | 180 |
| 176 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 181 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
| OLD | NEW |