| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const ui::Event& event) OVERRIDE; | 57 const ui::Event& event) OVERRIDE; |
| 58 | 58 |
| 59 // views::WidgetDelegate method. | 59 // views::WidgetDelegate method. |
| 60 virtual void WindowClosing() OVERRIDE; | 60 virtual void WindowClosing() OVERRIDE; |
| 61 | 61 |
| 62 // views::View methods. | 62 // views::View methods. |
| 63 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 63 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 64 virtual gfx::Size GetPreferredSize() OVERRIDE; | 64 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 65 | 65 |
| 66 // views::CombboxListener methods. | 66 // views::CombboxListener methods. |
| 67 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE; | 67 virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE; |
| 68 virtual void OnComboboxTextButtonClicked(views::Combobox* combobox) OVERRIDE; | |
| 69 | 68 |
| 70 // views::LinkListener method. | 69 // views::LinkListener method. |
| 71 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 70 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 72 | 71 |
| 73 // content::WebContentsObserver method. | 72 // content::WebContentsObserver method. |
| 74 virtual void WebContentsDestroyed(content::WebContents* web_contents) | 73 virtual void WebContentsDestroyed(content::WebContents* web_contents) |
| 75 OVERRIDE; | 74 OVERRIDE; |
| 76 | 75 |
| 77 // Returns the current view state. | 76 // Returns the current view state. |
| 78 TranslateBubbleModel::ViewState GetViewState() const; | 77 TranslateBubbleModel::ViewState GetViewState() const; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Returns the current child view. | 123 // Returns the current child view. |
| 125 views::View* GetCurrentView(); | 124 views::View* GetCurrentView(); |
| 126 | 125 |
| 127 // Handles the event when the user presses a button. | 126 // Handles the event when the user presses a button. |
| 128 void HandleButtonPressed(ButtonID sender_id); | 127 void HandleButtonPressed(ButtonID sender_id); |
| 129 | 128 |
| 130 // Handles the event when the user clicks a link. | 129 // Handles the event when the user clicks a link. |
| 131 void HandleLinkClicked(LinkID sender_id); | 130 void HandleLinkClicked(LinkID sender_id); |
| 132 | 131 |
| 133 // Handles the event when the user changes an index of a combobox. | 132 // Handles the event when the user changes an index of a combobox. |
| 134 void HandleComboboxSelectedIndexChanged(ComboboxID sender_id); | 133 void HandleComboboxPerformAction(ComboboxID sender_id); |
| 135 | 134 |
| 136 // Updates the visibilities of child views according to the current view type. | 135 // Updates the visibilities of child views according to the current view type. |
| 137 void UpdateChildVisibilities(); | 136 void UpdateChildVisibilities(); |
| 138 | 137 |
| 139 // Creates the 'before translate' view. Caller takes ownership of the returned | 138 // Creates the 'before translate' view. Caller takes ownership of the returned |
| 140 // view. | 139 // view. |
| 141 views::View* CreateViewBeforeTranslate(); | 140 views::View* CreateViewBeforeTranslate(); |
| 142 | 141 |
| 143 // Creates the 'translating' view. Caller takes ownership of the returned | 142 // Creates the 'translating' view. Caller takes ownership of the returned |
| 144 // view. | 143 // view. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Whether the translation is acutually executed. | 192 // Whether the translation is acutually executed. |
| 194 bool translate_executed_; | 193 bool translate_executed_; |
| 195 | 194 |
| 196 // Whether one of denial buttons is clicked. | 195 // Whether one of denial buttons is clicked. |
| 197 bool denial_button_clicked_; | 196 bool denial_button_clicked_; |
| 198 | 197 |
| 199 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 198 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
| 200 }; | 199 }; |
| 201 | 200 |
| 202 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 201 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
| OLD | NEW |