OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_TRANSLATE_INFOBAR_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TRANSLATE_INFOBAR_BASE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
11 #import "base/mac/cocoa_protocols.h" | 11 #import "base/mac/cocoa_protocols.h" |
12 #import "base/memory/scoped_nsobject.h" | 12 #import "base/memory/scoped_nsobject.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/browser/translate/languages_menu_model.h" | 14 #include "chrome/browser/translate/languages_menu_model.h" |
15 #include "chrome/browser/translate/options_menu_model.h" | 15 #include "chrome/browser/translate/options_menu_model.h" |
16 #include "chrome/browser/translate/translate_infobar_delegate.h" | 16 #include "chrome/browser/translate/translate_infobar_delegate.h" |
17 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" | 17 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" |
18 #include "chrome/common/translate_errors.h" | 18 #include "chrome/common/translate_errors.h" |
19 | 19 |
20 class TranslateInfoBarMenuModel; | |
21 | |
22 #pragma mark TranslateInfoBarUtilities helper functions. | 20 #pragma mark TranslateInfoBarUtilities helper functions. |
23 namespace TranslateInfoBarUtilities { | 21 namespace TranslateInfoBarUtilities { |
24 | 22 |
25 // Move the |toMove| view |spacing| pixels before/after the |anchor| view. | 23 // Move the |toMove| view |spacing| pixels before/after the |anchor| view. |
26 // |after| signifies the side of |anchor| on which to place |toMove|. | 24 // |after| signifies the side of |anchor| on which to place |toMove|. |
27 void MoveControl(NSView* anchor, NSView* toMove, int spacing, bool after); | 25 void MoveControl(NSView* anchor, NSView* toMove, int spacing, bool after); |
28 | 26 |
29 // Vertically center |toMove| in its container. | 27 // Vertically center |toMove| in its container. |
30 void VerticallyCenterView(NSView *toMove); | 28 void VerticallyCenterView(NSView *toMove); |
31 // Check that the control |before| is ordered visually before the |after| | 29 // Check that the control |before| is ordered visually before the |after| |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Returns the underlying options menu. | 152 // Returns the underlying options menu. |
155 - (NSMenu*)optionsMenu; | 153 - (NSMenu*)optionsMenu; |
156 | 154 |
157 // Returns |translateMessageButton_|, see declaration of member | 155 // Returns |translateMessageButton_|, see declaration of member |
158 // variable for a full description. | 156 // variable for a full description. |
159 - (NSButton*)translateMessageButton; | 157 - (NSButton*)translateMessageButton; |
160 | 158 |
161 @end // TranslateInfoBarControllerBase (TestingAPI) | 159 @end // TranslateInfoBarControllerBase (TestingAPI) |
162 | 160 |
163 | 161 |
164 #endif // CHROME_BROWSER_UI_COCOA_TRANSLATE_INFOBAR_BASE_H_ | 162 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ |
OLD | NEW |