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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chrome/browser/translate/chrome_translate_client.h" | 12 #include "chrome/browser/translate/chrome_translate_client.h" |
13 #include "chrome/browser/ui/translate/language_combobox_model.h" | 13 #include "chrome/browser/ui/translate/language_combobox_model.h" |
14 #include "chrome/browser/ui/translate/translate_bubble_model.h" | 14 #include "chrome/browser/ui/translate/translate_bubble_model.h" |
| 15 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h" |
15 #include "components/translate/core/common/translate_errors.h" | 16 #include "components/translate/core/common/translate_errors.h" |
16 #include "content/public/browser/web_contents_observer.h" | 17 #include "content/public/browser/web_contents_observer.h" |
17 #include "ui/views/bubble/bubble_delegate.h" | |
18 #include "ui/views/controls/button/button.h" | 18 #include "ui/views/controls/button/button.h" |
19 #include "ui/views/controls/combobox/combobox_listener.h" | 19 #include "ui/views/controls/combobox/combobox_listener.h" |
20 #include "ui/views/controls/link_listener.h" | 20 #include "ui/views/controls/link_listener.h" |
21 | 21 |
22 class PrefService; | 22 class PrefService; |
23 | 23 |
24 namespace views { | 24 namespace views { |
25 class Checkbox; | 25 class Checkbox; |
26 class GridLayout; | 26 class GridLayout; |
27 class LabelButton; | 27 class LabelButton; |
28 class Link; | 28 class Link; |
29 class View; | 29 class View; |
30 } | 30 } |
31 | 31 |
32 namespace ui { | 32 namespace ui { |
33 class SimpleComboboxModel; | 33 class SimpleComboboxModel; |
34 } | 34 } |
35 | 35 |
36 class TranslateBubbleView : public views::BubbleDelegateView, | 36 class TranslateBubbleView : public ManagedFullScreenBubbleDelegateView, |
37 public views::ButtonListener, | 37 public views::ButtonListener, |
38 public views::ComboboxListener, | 38 public views::ComboboxListener, |
39 public views::LinkListener, | 39 public views::LinkListener, |
40 public content::WebContentsObserver { | 40 public content::WebContentsObserver { |
41 public: | 41 public: |
42 ~TranslateBubbleView() override; | 42 ~TranslateBubbleView() override; |
43 | 43 |
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 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Whether the translation is acutually executed. | 202 // Whether the translation is acutually executed. |
203 bool translate_executed_; | 203 bool translate_executed_; |
204 | 204 |
205 // Whether one of denial buttons is clicked. | 205 // Whether one of denial buttons is clicked. |
206 bool denial_button_clicked_; | 206 bool denial_button_clicked_; |
207 | 207 |
208 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 208 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
209 }; | 209 }; |
210 | 210 |
211 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 211 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
OLD | NEW |