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

Side by Side Diff: chrome/browser/ui/views/page_info_bubble_view.h

Issue 10413061: Make PageInfoBubble not use BrowserList::GetLastActive and instead obtain a navigator at creation t… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/page_info_model.h" 10 #include "chrome/browser/page_info_model.h"
11 #include "chrome/browser/page_info_model_observer.h" 11 #include "chrome/browser/page_info_model_observer.h"
12 #include "ui/base/animation/slide_animation.h" 12 #include "ui/base/animation/slide_animation.h"
13 #include "ui/views/bubble/bubble_delegate.h" 13 #include "ui/views/bubble/bubble_delegate.h"
14 #include "ui/views/controls/link_listener.h" 14 #include "ui/views/controls/link_listener.h"
15 15
16 namespace content { 16 namespace content {
17 class PageNavigator;
17 struct SSLStatus; 18 struct SSLStatus;
18 } 19 }
19 20
20 class PageInfoBubbleView : public views::BubbleDelegateView, 21 class PageInfoBubbleView : public views::BubbleDelegateView,
21 public PageInfoModelObserver, 22 public PageInfoModelObserver,
22 public views::LinkListener { 23 public views::LinkListener {
23 public: 24 public:
24 PageInfoBubbleView(views::View* anchor_view, 25 PageInfoBubbleView(views::View* anchor_view,
25 Profile* profile, 26 Profile* profile,
26 const GURL& url, 27 const GURL& url,
27 const content::SSLStatus& ssl, 28 const content::SSLStatus& ssl,
28 bool show_history); 29 bool show_history,
30 content::PageNavigator* navigator);
29 virtual ~PageInfoBubbleView(); 31 virtual ~PageInfoBubbleView();
30 32
31 // Show the certificate dialog. 33 // Show the certificate dialog.
32 void ShowCertDialog(); 34 void ShowCertDialog();
33 35
34 // views::View methods: 36 // views::View methods:
35 virtual gfx::Size GetPreferredSize() OVERRIDE; 37 virtual gfx::Size GetPreferredSize() OVERRIDE;
36 38
37 // PageInfoModelObserver methods: 39 // PageInfoModelObserver methods:
38 virtual void OnPageInfoModelChanged() OVERRIDE; 40 virtual void OnPageInfoModelChanged() OVERRIDE;
(...skipping 29 matching lines...) Expand all
68 70
69 // The Help Center link at the bottom of the bubble. 71 // The Help Center link at the bottom of the bubble.
70 views::Link* help_center_link_; 72 views::Link* help_center_link_;
71 73
72 // Animation that helps us change size smoothly as more data comes in. 74 // Animation that helps us change size smoothly as more data comes in.
73 ui::SlideAnimation resize_animation_; 75 ui::SlideAnimation resize_animation_;
74 76
75 // The height of the info bubble at the start of the resize animation. 77 // The height of the info bubble at the start of the resize animation.
76 int animation_start_height_; 78 int animation_start_height_;
77 79
80 // Used for loading pages.
81 content::PageNavigator* navigator_;
82
78 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); 83 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView);
79 }; 84 };
80 85
81 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_ 86 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/page_info_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698