Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller.mm

Issue 2290753004: Finish changing chrome/ grit includes to use qualified paths. (Closed)
Patch Set: Rebase, fix new unqualified include Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 10 matching lines...) Expand all
21 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 21 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
22 #include "chrome/browser/ui/translate/language_combobox_model.h" 22 #include "chrome/browser/ui/translate/language_combobox_model.h"
23 #include "chrome/browser/ui/translate/translate_bubble_model.h" 23 #include "chrome/browser/ui/translate/translate_bubble_model.h"
24 #include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h" 24 #include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
25 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
26 #include "chrome/grit/generated_resources.h" 26 #include "chrome/grit/generated_resources.h"
27 #include "components/strings/grit/components_strings.h" 27 #include "components/strings/grit/components_strings.h"
28 #include "components/translate/core/browser/translate_ui_delegate.h" 28 #include "components/translate/core/browser/translate_ui_delegate.h"
29 #include "content/public/browser/browser_context.h" 29 #include "content/public/browser/browser_context.h"
30 #include "content/public/common/referrer.h" 30 #include "content/public/common/referrer.h"
31 #include "grit/ui_resources.h"
32 #include "skia/ext/skia_utils_mac.h" 31 #include "skia/ext/skia_utils_mac.h"
33 #include "ui/base/cocoa/cocoa_base_utils.h" 32 #include "ui/base/cocoa/cocoa_base_utils.h"
34 #include "ui/base/cocoa/controls/hyperlink_text_view.h" 33 #include "ui/base/cocoa/controls/hyperlink_text_view.h"
35 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" 34 #import "ui/base/cocoa/controls/hyperlink_button_cell.h"
36 #import "ui/base/cocoa/window_size_constants.h" 35 #import "ui/base/cocoa/window_size_constants.h"
37 #include "ui/base/l10n/l10n_util.h" 36 #include "ui/base/l10n/l10n_util.h"
38 #include "ui/base/models/combobox_model.h" 37 #include "ui/base/models/combobox_model.h"
38 #include "ui/resources/grit/ui_resources.h"
39 39
40 // TODO(hajimehoshi): This class is almost same as that of views. Refactor them. 40 // TODO(hajimehoshi): This class is almost same as that of views. Refactor them.
41 class TranslateDenialComboboxModel : public ui::ComboboxModel { 41 class TranslateDenialComboboxModel : public ui::ComboboxModel {
42 public: 42 public:
43 explicit TranslateDenialComboboxModel( 43 explicit TranslateDenialComboboxModel(
44 const base::string16& original_language_name) { 44 const base::string16& original_language_name) {
45 // Dummy menu item, which is shown on the top of a NSPopUpButton. The top 45 // Dummy menu item, which is shown on the top of a NSPopUpButton. The top
46 // text of the denial pop up menu should be IDS_TRANSLATE_BUBBLE_DENY, while 46 // text of the denial pop up menu should be IDS_TRANSLATE_BUBBLE_DENY, while
47 // it is impossible to use it here because NSPopUpButtons' addItemWithTitle 47 // it is impossible to use it here because NSPopUpButtons' addItemWithTitle
48 // removes a duplicated menu item. Instead, the title will be set later by 48 // removes a duplicated menu item. Instead, the title will be set later by
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 // source or target language on the before translate view. 879 // source or target language on the before translate view.
880 - (BOOL)textView:(NSTextView*)aTextView 880 - (BOOL)textView:(NSTextView*)aTextView
881 clickedOnLink:(id)link 881 clickedOnLink:(id)link
882 atIndex:(NSUInteger)charIndex { 882 atIndex:(NSUInteger)charIndex {
883 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); 883 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED);
884 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; 884 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED];
885 return YES; 885 return YES;
886 } 886 }
887 887
888 @end 888 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698