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_INLINE_SERVICE_VIEW_CONTROLLE
R_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_INLINE_SERVICE_VIEW_CONTROLLE
R_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_INLINE_SERVICE_VIEW_CONTROLLE
R_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_INLINE_SERVICE_VIEW_CONTROLLE
R_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 "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #import "chrome/browser/ui/cocoa/intents/web_intent_view_controller.h" | 12 #import "chrome/browser/ui/cocoa/intents/web_intent_view_controller.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 class WebIntentInlineDispositionDelegate; | 18 class WebIntentInlineDispositionDelegate; |
19 class WebIntentPickerCocoa2; | 19 class WebIntentPickerCocoa; |
20 | 20 |
21 // The inline service view shows a web view for a given service. | 21 // The inline service view shows a web view for a given service. |
22 @interface WebIntentInlineServiceViewController : WebIntentViewController { | 22 @interface WebIntentInlineServiceViewController : WebIntentViewController { |
23 @private | 23 @private |
24 WebIntentPickerCocoa2* picker_; // weak | 24 WebIntentPickerCocoa* picker_; // weak |
25 scoped_nsobject<NSImageView> serviceIconImageView_; | 25 scoped_nsobject<NSImageView> serviceIconImageView_; |
26 scoped_nsobject<NSTextField> serviceNameTextField_; | 26 scoped_nsobject<NSTextField> serviceNameTextField_; |
27 scoped_nsobject<NSButton> chooseServiceButton_; | 27 scoped_nsobject<NSButton> chooseServiceButton_; |
28 scoped_nsobject<NSBox> separator_; | 28 scoped_nsobject<NSBox> separator_; |
29 scoped_nsobject<NSView> webContentView_; | 29 scoped_nsobject<NSView> webContentView_; |
30 GURL serviceURL_; | 30 GURL serviceURL_; |
31 // Order here is important, as webContents_ may send messages to | 31 // Order here is important, as webContents_ may send messages to |
32 // delegate_ when it gets destroyed. | 32 // delegate_ when it gets destroyed. |
33 scoped_ptr<content::WebContents> webContents_; | 33 scoped_ptr<content::WebContents> webContents_; |
34 scoped_ptr<WebIntentInlineDispositionDelegate> delegate_; | 34 scoped_ptr<WebIntentInlineDispositionDelegate> delegate_; |
35 } | 35 } |
36 | 36 |
37 - (id)initWithPicker:(WebIntentPickerCocoa2*)picker; | 37 - (id)initWithPicker:(WebIntentPickerCocoa*)picker; |
38 | 38 |
39 - (NSButton*)chooseServiceButton; | 39 - (NSButton*)chooseServiceButton; |
40 - (content::WebContents*)webContents; | 40 - (content::WebContents*)webContents; |
41 | 41 |
42 // Gets the minimum size of the web view shown inside picker dialog. | 42 // Gets the minimum size of the web view shown inside picker dialog. |
43 - (NSSize)minimumInlineWebViewSizeForFrame:(NSRect)frame; | 43 - (NSSize)minimumInlineWebViewSizeForFrame:(NSRect)frame; |
44 | 44 |
45 - (void)setServiceName:(NSString*)serviceName; | 45 - (void)setServiceName:(NSString*)serviceName; |
46 - (void)setServiceIcon:(NSImage*)serviceIcon; | 46 - (void)setServiceIcon:(NSImage*)serviceIcon; |
47 - (void)setServiceURL:(const GURL&)url; | 47 - (void)setServiceURL:(const GURL&)url; |
48 - (void)setChooseServiceButtonHidden:(BOOL)isHidden; | 48 - (void)setChooseServiceButtonHidden:(BOOL)isHidden; |
49 | 49 |
50 @end | 50 @end |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_INLINE_SERVICE_VIEW_CONTRO
LLER_H_ | 52 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_INLINE_SERVICE_VIEW_CONTRO
LLER_H_ |
OLD | NEW |