OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/page_info_model.h" |
| 10 #include "chrome/browser/views/info_bubble.h" |
| 11 #include "views/view.h" |
| 12 |
| 13 namespace views { |
| 14 class Label; |
| 15 } |
| 16 |
| 17 class PageInfoBubbleView : public views::View, |
| 18 public PageInfoModel::PageInfoModelObserver, |
| 19 public InfoBubbleDelegate { |
| 20 public: |
| 21 PageInfoBubbleView(Profile* profile, |
| 22 const GURL& url, |
| 23 const NavigationEntry::SSLStatus& ssl, |
| 24 bool show_history); |
| 25 virtual ~PageInfoBubbleView(); |
| 26 |
| 27 |
| 28 void set_info_bubble(InfoBubble* info_bubble) { info_bubble_ = info_bubble; } |
| 29 |
| 30 // View methods: |
| 31 virtual gfx::Size GetPreferredSize(); |
| 32 |
| 33 // PageInfoModel::PageInfoModelObserver methods: |
| 34 virtual void ModelChanged(); |
| 35 |
| 36 // InfoBubbleDelegate methods: |
| 37 virtual void InfoBubbleClosing(InfoBubble* info_bubble, |
| 38 bool closed_by_escape) {} |
| 39 virtual bool CloseOnEscape() { return true; } |
| 40 virtual bool FadeInOnShow() { return false; } |
| 41 virtual std::wstring accessible_name() { return L"PageInfoBubble"; } |
| 42 |
| 43 private: |
| 44 // Layout the sections within the bubble. |
| 45 void LayoutSections(); |
| 46 |
| 47 // The model providing the various section info. |
| 48 PageInfoModel model_; |
| 49 |
| 50 // The id of the certificate for this page. |
| 51 int cert_id_; |
| 52 |
| 53 InfoBubble* info_bubble_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); |
| 56 }; |
| 57 |
| 58 #endif // CHROME_BROWSER_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ |
OLD | NEW |