OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #include "base/memory/scoped_nsobject.h" |
| 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 13 #include "chrome/browser/ui/intents/web_intent_picker.h" |
| 14 |
| 15 class WebIntentPickerCocoa; |
| 16 class WebIntentPickerModel; |
| 17 |
| 18 // Controller for intent picker constrained dialog. This dialog pops up |
| 19 // whenever a web page invokes ActivateIntent and lets the user choose which |
| 20 // service should be used to handle this action. |
| 21 @interface WebIntentPickerSheetController : NSWindowController { |
| 22 @private |
| 23 // C++ <-> ObjectiveC bridge. Weak reference. |
| 24 WebIntentPickerCocoa* picker_; |
| 25 |
| 26 // Inline disposition tab contents. Weak reference. |
| 27 TabContentsWrapper* contents_; |
| 28 } |
| 29 |
| 30 // Initialize the constrained dialog, and connect to picker. |
| 31 - (id)initWithPicker:(WebIntentPickerCocoa*)picker; |
| 32 |
| 33 // Set the contents for inline disposition intents. |
| 34 - (void)setInlineDispositionTabContents:(TabContentsWrapper*)wrapper; |
| 35 |
| 36 - (void)performLayoutWithModel:(WebIntentPickerModel*)model; |
| 37 |
| 38 // Close the current sheet (and by extension, the constrained dialog). |
| 39 - (void)closeSheet; |
| 40 |
| 41 // Notification handler - called when sheet has been closed. |
| 42 - (void)sheetDidEnd:(NSWindow*)sheet |
| 43 returnCode:(int)returnCode |
| 44 contextInfo:(void*)contextInfo; |
| 45 @end // WebIntentPickerSheetController |
| 46 |
| 47 #endif // CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_ |
OLD | NEW |