Chromium Code Reviews| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 DisplayReason reason); | 75 DisplayReason reason); |
| 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 // LocationBarBubbleDelegateView: | |
| 86 void CloseBubble() override; | |
|
Peter Kasting
2016/06/13 20:27:24
This was protected in the base class. Does it nee
hcarmona
2016/06/13 20:49:03
Done, it's now protected.
| |
| 87 | |
| 85 // views::BubbleDialogDelegateView methods. | 88 // views::BubbleDialogDelegateView methods. |
| 86 void Init() override; | 89 void Init() override; |
| 87 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 90 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 88 | 91 |
| 89 // views::WidgetDelegate methods. | 92 // views::WidgetDelegate methods. |
| 90 bool ShouldShowCloseButton() const override; | 93 bool ShouldShowCloseButton() const override; |
| 91 void WindowClosing() override; | 94 void WindowClosing() override; |
| 92 | 95 |
| 93 // views::View methods. | 96 // views::View methods. |
| 94 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 97 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 95 gfx::Size GetPreferredSize() const override; | 98 gfx::Size GetPreferredSize() const override; |
| 96 | 99 |
| 97 // views::CombboxListener methods. | 100 // views::CombboxListener methods. |
|
Peter Kasting
2016/06/13 20:27:24
Nit: While here: Combobox
hcarmona
2016/06/13 20:49:03
Done.
| |
| 98 void OnPerformAction(views::Combobox* combobox) override; | 101 void OnPerformAction(views::Combobox* combobox) override; |
| 99 | 102 |
| 100 // views::LinkListener method. | 103 // views::LinkListener method. |
| 101 void LinkClicked(views::Link* source, int event_flags) override; | 104 void LinkClicked(views::Link* source, int event_flags) override; |
| 102 | 105 |
| 103 // views::MenuButtonListener method. | 106 // views::MenuButtonListener method. |
| 104 void OnMenuButtonClicked(views::MenuButton* source, | 107 void OnMenuButtonClicked(views::MenuButton* source, |
| 105 const gfx::Point& point, | 108 const gfx::Point& point, |
| 106 const ui::Event* event) override; | 109 const ui::Event* event) override; |
| 107 | 110 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 std::unique_ptr<ui::SimpleMenuModel> denial_menu_model_; | 244 std::unique_ptr<ui::SimpleMenuModel> denial_menu_model_; |
| 242 std::unique_ptr<views::MenuRunner> denial_menu_runner_; | 245 std::unique_ptr<views::MenuRunner> denial_menu_runner_; |
| 243 | 246 |
| 244 std::unique_ptr<TranslateBubbleModel> model_; | 247 std::unique_ptr<TranslateBubbleModel> model_; |
| 245 | 248 |
| 246 translate::TranslateErrors::Type error_type_; | 249 translate::TranslateErrors::Type error_type_; |
| 247 | 250 |
| 248 // Whether the window is an incognito window. | 251 // Whether the window is an incognito window. |
| 249 const bool is_in_incognito_window_; | 252 const bool is_in_incognito_window_; |
| 250 | 253 |
| 254 std::unique_ptr<WebContentMouseHandler> mouse_handler_; | |
| 255 | |
| 251 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 256 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
| 252 }; | 257 }; |
| 253 | 258 |
| 254 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 259 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
| OLD | NEW |