Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_ABOUT_PANEL_BUBBLE_H_ | |
| 6 #define CHROME_BROWSER_UI_PANELS_ABOUT_PANEL_BUBBLE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/gtest_prod_util.h" | |
| 10 #include "chrome/browser/ui/views/bubble/bubble.h" | |
| 11 #include "views/controls/link_listener.h" | |
| 12 | |
| 13 class Browser; | |
| 14 namespace views { | |
| 15 class ImageView; | |
| 16 class Label; | |
| 17 class Link; | |
| 18 class Textfield; | |
| 19 } | |
| 20 | |
| 21 class AboutPanelBubble : public Bubble , | |
|
jennb
2011/05/24 05:29:14
extra space before comma
jianli
2011/05/24 18:20:24
Done.
| |
| 22 public BubbleDelegate { | |
| 23 public: | |
| 24 static AboutPanelBubble* Show(views::Widget* parent, | |
|
jennb
2011/05/24 05:29:14
could this ever fail to create an AboutPanelBubble
jianli
2011/05/24 18:20:24
It can fail now since I moved the extension findin
| |
| 25 const gfx::Rect& position_relative_to, | |
| 26 BubbleBorder::ArrowLocation arrow_location, | |
| 27 SkBitmap icon, | |
| 28 Browser* browser); | |
| 29 | |
| 30 private: | |
| 31 friend class PanelBrowserViewTest; | |
| 32 FRIEND_TEST_ALL_PREFIXES(PanelBrowserViewTest, AboutPanelBubble); | |
| 33 | |
| 34 class AboutPanelBubbleView : public views::View, | |
|
jennb
2011/05/24 05:29:14
Does this really need to be a nested class?
jianli
2011/05/24 18:20:24
Yes, we do not want it be accessible from other pl
| |
| 35 public views::LinkListener { | |
| 36 public: | |
| 37 AboutPanelBubbleView(SkBitmap icon, Browser* browser); | |
| 38 | |
| 39 private: | |
| 40 friend class PanelBrowserViewTest; | |
| 41 FRIEND_TEST_ALL_PREFIXES(PanelBrowserViewTest, AboutPanelBubble); | |
| 42 | |
| 43 virtual ~AboutPanelBubbleView() { } | |
| 44 | |
| 45 // Overridden from View: | |
| 46 virtual void Layout() OVERRIDE; | |
| 47 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 48 | |
| 49 // Overridden from LinkListener: | |
| 50 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | |
| 51 | |
| 52 views::ImageView* icon_; | |
| 53 views::Label* title_; | |
| 54 views::Label* install_date_; | |
| 55 views::Textfield* description_; | |
| 56 views::Link* uninstall_link_; | |
| 57 views::Link* report_abuse_link_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(AboutPanelBubbleView); | |
| 60 }; | |
| 61 | |
| 62 AboutPanelBubble(); | |
| 63 virtual ~AboutPanelBubble() { } | |
| 64 | |
| 65 // Overridden from BubbleDelegate: | |
| 66 virtual void BubbleClosing(Bubble* info_bubble, bool closed_by_escape) | |
| 67 OVERRIDE {} | |
| 68 virtual bool CloseOnEscape() OVERRIDE; | |
| 69 virtual bool FadeInOnShow() OVERRIDE; | |
| 70 virtual std::wstring accessible_name() OVERRIDE; | |
| 71 | |
| 72 DISALLOW_COPY_AND_ASSIGN(AboutPanelBubble); | |
| 73 }; | |
| 74 | |
| 75 #endif // CHROME_BROWSER_UI_PANELS_ABOUT_PANEL_BUBBLE_H_ | |
| OLD | NEW |