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-18 00:34:06 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-18 00:34:06 +0000
commitd4c755d3917ec20b811d4b868c18cb40cae6713b (patch)
treeab2fa1b64c4a0cacd379ef0950f381be12eeb810 /chrome/browser/cocoa/page_info_window_mac.h
parentcf07e5608a8712bea53666d2ee3adbf3d182899c (diff)
downloadchromium_src-d4c755d3917ec20b811d4b868c18cb40cae6713b.zip
chromium_src-d4c755d3917ec20b811d4b868c18cb40cae6713b.tar.gz
chromium_src-d4c755d3917ec20b811d4b868c18cb40cae6713b.tar.bz2
Refactoring the page info to have a model.BUG=NoneTEST=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.
Review URL: http://codereview.chromium.org/155336 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21032 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);
};