| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "chrome/browser/translate/translate_ui_delegate.h" | |
| 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 11 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 12 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 13 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 15 #include "chrome/browser/ui/translate/language_combobox_model.h" | 14 #include "chrome/browser/ui/translate/language_combobox_model.h" |
| 16 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h" | 15 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h" |
| 16 #include "components/translate/core/browser/translate_ui_delegate.h" |
| 17 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" | 19 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| 20 #import "ui/base/cocoa/window_size_constants.h" | 20 #import "ui/base/cocoa/window_size_constants.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/base/models/combobox_model.h" | 22 #include "ui/base/models/combobox_model.h" |
| 23 | 23 |
| 24 // TODO(hajimehoshi): This class is almost same as that of views. Refactor them. | 24 // TODO(hajimehoshi): This class is almost same as that of views. Refactor them. |
| 25 class TranslateDenialComboboxModel : public ui::ComboboxModel { | 25 class TranslateDenialComboboxModel : public ui::ComboboxModel { |
| 26 public: | 26 public: |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 [self updateAdvancedView]; | 657 [self updateAdvancedView]; |
| 658 } | 658 } |
| 659 | 659 |
| 660 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender { | 660 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender { |
| 661 NSPopUpButton* button = base::mac::ObjCCastStrict<NSPopUpButton>(sender); | 661 NSPopUpButton* button = base::mac::ObjCCastStrict<NSPopUpButton>(sender); |
| 662 model_->UpdateTargetLanguageIndex([button indexOfSelectedItem]); | 662 model_->UpdateTargetLanguageIndex([button indexOfSelectedItem]); |
| 663 [self updateAdvancedView]; | 663 [self updateAdvancedView]; |
| 664 } | 664 } |
| 665 | 665 |
| 666 @end | 666 @end |
| OLD | NEW |