summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/cookie_prompt_window_controller.h
diff options
context:
space:
mode:
authordanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 06:54:09 +0000
committerdanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 06:54:09 +0000
commitd0edf4e5adf877515ff49a59f63600fd88a25b36 (patch)
treead789884b7918146fcbcddaf4f10284836ff3496 /chrome/browser/cocoa/cookie_prompt_window_controller.h
parent5fed0f1c5195ded63dfadadeb93c0b1d006f1fb4 (diff)
downloadchromium_src-d0edf4e5adf877515ff49a59f63600fd88a25b36.zip
chromium_src-d0edf4e5adf877515ff49a59f63600fd88a25b36.tar.gz
chromium_src-d0edf4e5adf877515ff49a59f63600fd88a25b36.tar.bz2
[Mac] augment modal cookie prompt on mac to include details pane
Added two new xibs. The first is a cookie info view that is shared between the tree that shows browser data and the cookie modal prompt to block accepting cookies. The second is a window to replace the NSAlert modal dialog for the cookie prompt. Modified cookie tree code and added cookie prompt code to use new xibs. Changed "hidden" handling of cookie detail view to use bindings rather than explicit code. TODOs for http://crbug.com/36948 not in this CL: - changing the expiration for cookies isn't implemented TEST=manually testing of modal cookie prompt, new unit tests BUG=http://crbug.com/36948 Review URL: http://codereview.chromium.org/669127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/cookie_prompt_window_controller.h')
-rw-r--r--chrome/browser/cocoa/cookie_prompt_window_controller.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/cookie_prompt_window_controller.h b/chrome/browser/cocoa/cookie_prompt_window_controller.h
new file mode 100644
index 0000000..5276d5c
--- /dev/null
+++ b/chrome/browser/cocoa/cookie_prompt_window_controller.h
@@ -0,0 +1,61 @@
+// Copyright (c) 2010 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.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/cocoa_protocols_mac.h"
+#include "base/scoped_nsobject.h"
+#include "base/scoped_ptr.h"
+
+class CookiePromptModalDialog;
+class CookieTreeNode;
+
+@class CookieDetailsViewController;
+@class CocoaCookieTreeNode;
+
+// This class is the controller for the window displayed
+// to the user as a modal dialog prompting them to accept or
+// block new cookies and other browser data.
+@interface CookiePromptWindowController : NSWindowController {
+ @private
+ // Provides access to platform independent information for
+ // the cookie prompt dialog.
+ CookiePromptModalDialog* dialog_; // weak;
+
+ // The controller managing the instances of the cookies details view
+ // embedded in the prompt window.
+ scoped_nsobject<CookieDetailsViewController> detailsViewController_;
+
+ // The adapter object that supplies the methods expected by
+ // the cookie details view.
+ scoped_nsobject<NSObject> selectionAdapterObject_;
+
+ // Outlets to provide quick access to subviews
+ // in the prompt window.
+ IBOutlet NSTextField* description_;
+ IBOutlet NSView* disclosedViewPlaceholder_;
+ IBOutlet NSButton* disclosureTriangle_;
+ IBOutlet NSView* disclosureTriangleSuperView_;
+ IBOutlet NSMatrix* radioGroupMatrix_;
+ IBOutlet NSButtonCell* rememberChoiceCell_;
+}
+
+// Designated initializer.
+- (id)initWithDialog:(CookiePromptModalDialog*)bridge;
+
+// Performs the modal dialog loop for the cookie prompt dialog
+// and processes the result.
+- (void)doModalDialog:(void*)context;
+
+// Handles the toggling of the disclosure triangle
+// to reveal cookie data
+- (IBAction)disclosureTrianglePressed:(id)sender;
+
+// Callback for "block" button.
+- (IBAction)block:(id)sender;
+
+// Callback for "accept" button.
+- (IBAction)accept:(id)sender;
+
+@end