OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 class WebIntentPickerCocoa2; | 13 class WebIntentPickerCocoa2; |
14 @class WebIntentViewControllerMessage; | 14 @class WebIntentViewControllerMessage; |
15 @class WebIntentViewControllerProgress; | |
15 | 16 |
16 enum WebIntentPickerState { | 17 enum WebIntentPickerState { |
18 PICKER_STATE_WAITING, | |
17 PICKER_STATE_NO_SERVICE, | 19 PICKER_STATE_NO_SERVICE, |
20 PICKER_STATE_INSTALLING_EXTENSION, | |
Nico
2012/10/02 03:47:25
(this value might not belong to this cl? not an is
Nico
2012/10/02 03:47:25
Would these enums be useful for the other UIs too?
sail
2012/10/10 02:00:10
The progress UI is used for two states, waiting an
sail
2012/10/10 02:00:10
Not sure, I think Rachel and Greg are still doing
| |
18 }; | 21 }; |
19 | 22 |
20 // Manages the web intent picker UI. The view is meant to be embedded in either | 23 // Manages the web intent picker UI. The view is meant to be embedded in either |
21 // a constrained window or a bubble. | 24 // a constrained window or a bubble. |
22 @interface WebIntentPickerViewController : NSViewController { | 25 @interface WebIntentPickerViewController : NSViewController { |
23 @private | 26 @private |
24 WebIntentPickerCocoa2* picker_; // weak | 27 WebIntentPickerCocoa2* picker_; // weak |
25 WebIntentPickerState state_; | 28 WebIntentPickerState state_; |
26 scoped_nsobject<NSButton> closeButton_; | 29 scoped_nsobject<NSButton> closeButton_; |
27 | 30 |
28 scoped_nsobject<WebIntentViewControllerMessage> | 31 scoped_nsobject<WebIntentViewControllerMessage> |
29 messageViewController_; | 32 messageViewController_; |
33 scoped_nsobject<WebIntentViewControllerProgress> | |
34 progressViewController_; | |
30 } | 35 } |
31 | 36 |
32 - (id)initWithPicker:(WebIntentPickerCocoa2*)picker; | 37 - (id)initWithPicker:(WebIntentPickerCocoa2*)picker; |
33 | 38 |
34 // Get the current state. | 39 // Get the current state. |
35 - (WebIntentPickerState)state; | 40 - (WebIntentPickerState)state; |
36 | 41 |
37 - (WebIntentViewControllerMessage*)messageViewController; | 42 - (WebIntentViewControllerMessage*)messageViewController; |
43 - (WebIntentViewControllerProgress*)progressViewController; | |
38 | 44 |
39 // Update the dialog state and perform layout. | 45 // Update the dialog state and perform layout. |
40 - (void)update; | 46 - (void)update; |
41 | 47 |
42 @end | 48 @end |
43 | 49 |
44 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ | 50 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_VIEW_CONTROLLER_H_ |
OLD | NEW |