summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/page_info_window_mac.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-19 07:37:12 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-19 07:37:12 +0000
commit4d67720512d8cf6b92d350a86f3fbacff45b4c75 (patch)
treeecadf3bd24c2d2d366bf4afb95c540bfc850297d /chrome/browser/cocoa/page_info_window_mac.h
parentd5102ee4076aa42ef3797fd276b5190afb8a8141 (diff)
downloadchromium_src-4d67720512d8cf6b92d350a86f3fbacff45b4c75.zip
chromium_src-4d67720512d8cf6b92d350a86f3fbacff45b4c75.tar.gz
chromium_src-4d67720512d8cf6b92d350a86f3fbacff45b4c75.tar.bz2
Relanding the the refactoring the page info to have a model.
BUG=None TEST=Make sure clicking the lock/warning icon when visiting a HTTPS page brings the page info and that it reports the correct info. Also check that the "Page/Frame info" right click menu works as well. TBR=ben Review URL: http://codereview.chromium.org/155753 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21065 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/page_info_window_mac.h')
-rw-r--r--chrome/browser/cocoa/page_info_window_mac.h47
1 files changed, 25 insertions, 22 deletions
diff --git a/chrome/browser/cocoa/page_info_window_mac.h b/chrome/browser/cocoa/page_info_window_mac.h
index 1665b79..0d1d660 100644
--- a/chrome/browser/cocoa/page_info_window_mac.h
+++ b/chrome/browser/cocoa/page_info_window_mac.h
@@ -5,46 +5,49 @@
#ifndef CHROME_BROWSER_COCOA_PAGE_INFO_WINDOW_MAC_H_
#define CHROME_BROWSER_COCOA_PAGE_INFO_WINDOW_MAC_H_
-#include "chrome/browser/history/history.h"
+#include "chrome/browser/page_info_model.h"
#include "chrome/browser/page_info_window.h"
-class CancelableRequestConsumerBase;
class Profile;
@class PageInfoWindowController;
-namespace base {
-class Time;
-}
-
-class PageInfoWindowMac : public PageInfoWindow {
+class PageInfoWindowMac : public PageInfoModel::PageInfoModelObserver {
public:
- PageInfoWindowMac(PageInfoWindowController* controller);
virtual ~PageInfoWindowMac();
- // This is the main initializer that creates the window.
- virtual void Init(Profile* profile,
- const GURL& url,
- const NavigationEntry::SSLStatus& ssl,
- NavigationEntry::PageType page_type,
- bool show_history,
- gfx::NativeView parent);
-
- virtual void Show();
+ // Creates and shows the page info.
+ static void ShowPageInfo(gfx::NativeView parent,
+ Profile* profile,
+ const GURL& url,
+ const NavigationEntry::SSLStatus& ssl,
+ bool show_history);
// Shows various information for the specified certificate in a new dialog.
// The argument is ignored here and we use the |cert_id_| member that was
// passed to us in Init().
virtual void ShowCertDialog(int);
+ // PageInfoModelObserver implementation.
+ virtual void ModelChanged();
+
private:
- void OnGotVisitCountToHost(HistoryService::Handle handle,
- bool found_visits,
- int count,
- base::Time first_visit);
+ PageInfoWindowMac(PageInfoWindowController* controller,
+ Profile* profile,
+ const GURL& url,
+ const NavigationEntry::SSLStatus& ssl,
+ bool show_history);
+
+ void LayoutSections();
+
+ void Show();
- CancelableRequestConsumer request_consumer_; // Used for getting visit count.
PageInfoWindowController* controller_; // WEAK, owns us.
+ PageInfoModel model_;
+
+ // The certificate ID for the page, 0 if the page is not over HTTPS.
+ int cert_id_;
+
DISALLOW_COPY_AND_ASSIGN(PageInfoWindowMac);
};