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

Unified Diff: chrome/browser/ui/cocoa/web_intent_sheet_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: Fixed review issues Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/web_intent_sheet_controller.h
diff --git a/chrome/browser/ui/cocoa/web_intent_sheet_controller.h b/chrome/browser/ui/cocoa/web_intent_sheet_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..5820f089a66cbfd5b8f1ceec2f9e70ed9684668c
--- /dev/null
+++ b/chrome/browser/ui/cocoa/web_intent_sheet_controller.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
+#include "chrome/browser/ui/intents/web_intent_picker.h"
+
+class WebIntentPickerCocoa;
+class WebIntentPickerModel;
+
+// Controller for intent picker constrained dialog. This dialog pops up
+// whenever a web page invokes ActivateIntent and lets the user choose which
+// service should be used to handle this action.
+@interface WebIntentPickerSheetController : NSWindowController {
+ @private
+ // C++ <-> ObjectiveC bridge. Weak reference.
+ WebIntentPickerCocoa* picker_;
+
+ // Inline disposition tab contents. Weak reference.
+ TabContentsWrapper* contents_;
+}
+
+// Initialize the constrained dialog, and connect to picker.
+- (id)initWithPicker:(WebIntentPickerCocoa*)picker;
+
+// Set the contents for inline disposition intents.
+- (void)setInlineDispositionTabContents:(TabContentsWrapper*)wrapper;
+
+- (void)performLayoutWithModel:(WebIntentPickerModel*)model;
+
+// Close the current sheet (and by extension, the constrained dialog).
+- (void)closeSheet;
+
+// Notification handler - called when sheet has been closed.
+- (void)sheetDidEnd:(NSWindow*)sheet
+ returnCode:(int)returnCode
+ contextInfo:(void*)contextInfo;
+@end // WebIntentPickerSheetController
+
+#endif // CHROME_BROWSER_UI_COCOA_WEB_INTENT_SHEET_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698