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

Side by Side Diff: ios/chrome/browser/ui/settings/translate_collection_view_controller.mm

Issue 2819793002: Translate: do not show the context menu entry when the feature is disabled (Closed)
Patch Set: some more include path changes for ios/android Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/ui/settings/translate_collection_view_controller.h" 5 #import "ios/chrome/browser/ui/settings/translate_collection_view_controller.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 #include "base/mac/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
12 #include "components/google/core/browser/google_util.h" 12 #include "components/google/core/browser/google_util.h"
13 #include "components/prefs/pref_member.h" 13 #include "components/prefs/pref_member.h"
14 #include "components/prefs/pref_service.h" 14 #include "components/prefs/pref_service.h"
15 #include "components/translate/core/browser/translate_pref_names.h"
15 #include "components/translate/core/browser/translate_prefs.h" 16 #include "components/translate/core/browser/translate_prefs.h"
16 #include "components/translate/core/common/translate_pref_names.h"
17 #include "ios/chrome/browser/application_context.h" 17 #include "ios/chrome/browser/application_context.h"
18 #import "ios/chrome/browser/translate/chrome_ios_translate_client.h" 18 #import "ios/chrome/browser/translate/chrome_ios_translate_client.h"
19 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h" 19 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h"
20 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item .h" 20 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item .h"
21 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item .h" 21 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_switch_item .h"
22 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h " 22 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h "
23 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" 23 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
24 #import "ios/chrome/browser/ui/settings/settings_utils.h" 24 #import "ios/chrome/browser/ui/settings/settings_utils.h"
25 #import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h" 25 #import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h"
26 #include "ios/chrome/browser/ui/uikit_ui_util.h" 26 #include "ios/chrome/browser/ui/uikit_ui_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 base::mac::ObjCCastStrict<CollectionViewSwitchCell>( 247 base::mac::ObjCCastStrict<CollectionViewSwitchCell>(
248 [self.collectionView cellForItemAtIndexPath:switchPath]); 248 [self.collectionView cellForItemAtIndexPath:switchPath]);
249 249
250 DCHECK_EQ(switchCell.switchView, sender); 250 DCHECK_EQ(switchCell.switchView, sender);
251 BOOL isOn = switchCell.switchView.isOn; 251 BOOL isOn = switchCell.switchView.isOn;
252 switchItem.on = isOn; 252 switchItem.on = isOn;
253 [_translationEnabled setValue:isOn]; 253 [_translationEnabled setValue:isOn];
254 } 254 }
255 255
256 @end 256 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698