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

Side by Side Diff: chrome/browser/cocoa/translate_infobar.h

Issue 594056: Translate Infobars for OS X. (Closed)
Patch Set: Fix review comments Created 10 years, 10 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
« no previous file with comments | « chrome/browser/cocoa/infobar_controller.h ('k') | chrome/browser/cocoa/translate_infobar.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6 #import "chrome/browser/cocoa/infobar_controller.h"
7
8 #include "base/scoped_nsobject.h"
9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/translate/languages_menu_model.h"
11 #include "chrome/browser/translate/options_menu_model.h"
12 #include "chrome/common/notification_registrar.h"
13
14 class TranslateInfoBarMenuModel;
15 class TranslateNotificationObserverBridge;
16
17 // Draws and maintains Translate Infobar GUI.
18 // The translate bar changes unidirectionally between 3 states:
19 // 1. "Before Translate" - source language popup and translate/cancel buttons
20 // visible.
21 // 2. "Translating" - "Translating..." status text visible in address bar.
22 // 3. "After Translation" - source & target language popups visible.
23 //
24 // The GUI uses popup menus interspersed in a text label. For localization
25 // purposes this means we potentially need 3 labels to display the UI (the 3rd
26 // is only visible in certain locales).
27 @interface TranslateInfoBarController : InfoBarController {
28 @protected
29 // label_ is defined in InfoBarController.
30 scoped_nsobject<NSTextField> label2_;
31 scoped_nsobject<NSTextField> label3_;
32 scoped_nsobject<NSTextField> translatingLabel_;
33 scoped_nsobject<NSPopUpButton> fromLanguagePopUp_;
34 scoped_nsobject<NSPopUpButton> toLanguagePopUp_;
35 scoped_nsobject<NSPopUpButton> optionsPopUp_;
36
37 // In the current locale, are the "from" and "to" language popup menu
38 // flipped from what they'd appear in English.
39 bool swappedLanguagePlaceholders_;
40
41 // Space between controls in pixels - read from the NIB.
42 CGFloat spaceBetweenControls_;
43 int numLabelsDisplayed_;
44
45 scoped_ptr<LanguagesMenuModel> original_language_menu_model_;
46 scoped_ptr<LanguagesMenuModel> target_language_menu_model_;
47 scoped_ptr<OptionsMenuModel> options_menu_model_;
48 scoped_ptr<TranslateInfoBarMenuModel> menu_model_;
49 scoped_ptr<TranslateNotificationObserverBridge> observer_bridge_;
50 }
51
52 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/infobar_controller.h ('k') | chrome/browser/cocoa/translate_infobar.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698