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

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

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing android build errors Created 6 years, 5 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 "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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 - (void)switchView:(TranslateBubbleModel::ViewState)viewState { 178 - (void)switchView:(TranslateBubbleModel::ViewState)viewState {
179 if (model_->GetViewState() == viewState) 179 if (model_->GetViewState() == viewState)
180 return; 180 return;
181 181
182 model_->SetViewState(viewState); 182 model_->SetViewState(viewState);
183 [self performLayout]; 183 [self performLayout];
184 } 184 }
185 185
186 - (void)switchToErrorView:(TranslateErrors::Type)errorType { 186 - (void)switchToErrorView:(translate::TranslateErrors::Type)errorType {
187 // FIXME: Implement this. 187 // FIXME: Implement this.
188 } 188 }
189 189
190 - (void)performLayout { 190 - (void)performLayout {
191 NSWindow* window = [self window]; 191 NSWindow* window = [self window];
192 [[window contentView] setSubviews:@[ [self currentView] ]]; 192 [[window contentView] setSubviews:@[ [self currentView] ]];
193 193
194 CGFloat height = NSHeight([[self currentView] frame]) + 194 CGFloat height = NSHeight([[self currentView] frame]) +
195 2 * kFramePadding + info_bubble::kBubbleArrowHeight; 195 2 * kFramePadding + info_bubble::kBubbleArrowHeight;
196 196
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698