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

Unified Diff: chrome/browser/cocoa/page_info_bubble_controller.h

Issue 3461016: [Mac] Convert the page info window to a bubble. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Address nits Created 10 years, 3 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/cocoa/page_info_bubble_controller.h
diff --git a/chrome/browser/cocoa/page_info_bubble_controller.h b/chrome/browser/cocoa/page_info_bubble_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d3d9a3087a86857f7a395a2d7398dbed77ecf48
--- /dev/null
+++ b/chrome/browser/cocoa/page_info_bubble_controller.h
@@ -0,0 +1,50 @@
+// 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/scoped_nsobject.h"
+#include "base/scoped_ptr.h"
+#import "chrome/browser/cocoa/base_bubble_controller.h"
+#include "chrome/browser/page_info_model.h"
+
+// This NSWindowController subclass manages the InfoBubbleWindow and view that
+// are displayed when the user clicks the security lock icon.
+@interface PageInfoBubbleController : BaseBubbleController {
+ @private
+ // The model that generates the content displayed by the controller.
+ scoped_ptr<PageInfoModel> model_;
+
+ // Thin bridge that pushes model-changed notifications from C++ to Cocoa.
+ scoped_ptr<PageInfoModel::PageInfoModelObserver> bridge_;
+
+ // The certificate ID for the page, 0 if the page is not over HTTPS.
+ int certID_;
+
+ // Reference to the images that are placed within the UI.
+ scoped_nsobject<NSImage> okImage_;
+ scoped_nsobject<NSImage> warningMinorImage_;
+ scoped_nsobject<NSImage> warningMajorImage_;
+ scoped_nsobject<NSImage> errorImage_;
+}
+
+@property (nonatomic, assign) int certID;
+
+// Designated initializer. The new instance will take ownership of |model| and
+// |bridge|. There should be a 1:1 mapping of models to bridges. The
+// controller will release itself when the bubble is closed.
+- (id)initWithPageInfoModel:(PageInfoModel*)model
+ modelObserver:(PageInfoModel::PageInfoModelObserver*)bridge
+ parentWindow:(NSWindow*)parentWindow;
+
+// Shows the certificate display window. Note that this will implicitly close
+// the bubble because the certificate window will become key. The certificate
+// information attaches itself as a sheet to the |parentWindow|.
+- (IBAction)showCertWindow:(id)sender;
+
+@end
+
+@interface PageInfoBubbleController (ExposedForUnitTesting)
+- (void)performLayout;
+@end
« no previous file with comments | « chrome/browser/cocoa/location_bar/location_icon_decoration.mm ('k') | chrome/browser/cocoa/page_info_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698