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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Closes the current bubble if it exists. | 77 // Closes the current bubble if it exists. |
78 static void CloseCurrentBubble(); | 78 static void CloseCurrentBubble(); |
79 | 79 |
80 // Returns the bubble view currently shown. This may return NULL. | 80 // Returns the bubble view currently shown. This may return NULL. |
81 static TranslateBubbleView* GetCurrentBubble(); | 81 static TranslateBubbleView* GetCurrentBubble(); |
82 | 82 |
83 TranslateBubbleModel* model() { return model_.get(); } | 83 TranslateBubbleModel* model() { return model_.get(); } |
84 | 84 |
85 // views::BubbleDialogDelegateView methods. | 85 // views::BubbleDialogDelegateView methods. |
| 86 int GetDialogButtons() const override; |
86 void Init() override; | 87 void Init() override; |
87 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 88 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
88 | 89 |
89 // views::WidgetDelegate methods. | 90 // views::WidgetDelegate methods. |
90 View* GetInitiallyFocusedView() override; | 91 View* GetInitiallyFocusedView() override; |
91 bool ShouldShowCloseButton() const override; | 92 bool ShouldShowCloseButton() const override; |
92 void WindowClosing() override; | 93 void WindowClosing() override; |
93 | 94 |
94 // views::View methods. | 95 // views::View methods. |
95 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 96 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 const bool is_in_incognito_window_; | 257 const bool is_in_incognito_window_; |
257 | 258 |
258 bool should_always_translate_; | 259 bool should_always_translate_; |
259 | 260 |
260 std::unique_ptr<WebContentMouseHandler> mouse_handler_; | 261 std::unique_ptr<WebContentMouseHandler> mouse_handler_; |
261 | 262 |
262 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 263 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
263 }; | 264 }; |
264 | 265 |
265 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 266 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
OLD | NEW |