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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_bubble_controller.h

Issue 9581041: Make web intents picker work as constrained dialog instead of InfoBubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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_WEB_INTENT_BUBBLE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_WEB_INTENT_BUBBLE_CONTROLLER_H_
Nico 2012/03/03 06:13:49 Should you rename the file, too? (tools/git/mass-r
groby-ooo-7-16 2012/03/03 23:41:49 Done.
6 #define CHROME_BROWSER_UI_COCOA_WEB_INTENT_BUBBLE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_WEB_INTENT_BUBBLE_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 #include "base/memory/scoped_nsobject.h" 11 #include "base/memory/scoped_nsobject.h"
12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
13 #include "chrome/browser/ui/intents/web_intent_picker.h" 13 #include "chrome/browser/ui/intents/web_intent_picker.h"
14 14
15 class WebIntentPickerCocoa; 15 class WebIntentPickerCocoa;
16 class WebIntentPickerModel; 16 class WebIntentPickerModel;
17 17
18 // Controller for intent picker bubble. This bubble pops up whenever a web 18 // Controller for intent picker constrained dialog. This bubble pops up whenever
19 // page invokes ActivateIntent and lets the user choose which service should 19 // a web page invokes ActivateIntent and lets the user choose which service
20 // be used to handle this action. 20 // should be used to handle this action.
21 @interface WebIntentBubbleController : BaseBubbleController { 21 @interface WebIntentBubbleController : NSWindowController {
22 @private 22 @private
23 // C++ <-> ObjectiveC bridge. Weak reference. 23 // C++ <-> ObjectiveC bridge. Weak reference.
24 WebIntentPickerCocoa* picker_; 24 WebIntentPickerCocoa* picker_;
25 25
26 // Inline disposition tab contents. Weak reference. 26 // Inline disposition tab contents. Weak reference.
27 TabContentsWrapper* contents_; 27 TabContentsWrapper* contents_;
28 } 28 }
29 29
30 // Initialize the window, and connect to bridge. 30 // Initialize the constrained dialog, and connect to picker.
31 - (id)initWithPicker:(WebIntentPickerCocoa*)picker 31 - (id)initWithPicker:(WebIntentPickerCocoa*)picker;
32 parentWindow:(NSWindow*)parent
33 anchoredAt:(NSPoint)point;
34 32
35 // Set the contents for inline disposition intents. 33 // Set the contents for inline disposition intents.
36 - (void)setInlineDispositionTabContents:(TabContentsWrapper*)wrapper; 34 - (void)setInlineDispositionTabContents:(TabContentsWrapper*)wrapper;
37 35
38 - (void)performLayoutWithModel:(WebIntentPickerModel*)model; 36 - (void)performLayoutWithModel:(WebIntentPickerModel*)model;
39 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;
40 @end // WebIntentBubbleController 45 @end // WebIntentBubbleController
41 46
42 #endif // CHROME_BROWSER_UI_COCOA_WEB_INTENT_BUBBLE_CONTROLLER_H_ 47 #endif // CHROME_BROWSER_UI_COCOA_WEB_INTENT_BUBBLE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698