| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PAGE_INFO_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Type of the bubble being displayed. | 70 // Type of the bubble being displayed. |
| 71 enum BubbleType { | 71 enum BubbleType { |
| 72 BUBBLE_NONE, | 72 BUBBLE_NONE, |
| 73 // Usual page info bubble for websites. | 73 // Usual page info bubble for websites. |
| 74 BUBBLE_PAGE_INFO, | 74 BUBBLE_PAGE_INFO, |
| 75 // Custom bubble for internal pages like chrome:// and chrome-extensions://. | 75 // Custom bubble for internal pages like chrome:// and chrome-extensions://. |
| 76 BUBBLE_INTERNAL_PAGE | 76 BUBBLE_INTERNAL_PAGE |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. | 79 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. |
| 80 static void ShowBubble(views::View* anchor_view, | 80 static views::BubbleDialogDelegateView* ShowBubble( |
| 81 views::WidgetObserver* widget_observer, | 81 views::View* anchor_view, |
| 82 const gfx::Rect& anchor_rect, | 82 views::WidgetObserver* widget_observer, |
| 83 Profile* profile, | 83 const gfx::Rect& anchor_rect, |
| 84 content::WebContents* web_contents, | 84 Profile* profile, |
| 85 const GURL& url, | 85 content::WebContents* web_contents, |
| 86 const security_state::SecurityInfo& security_info); | 86 const GURL& url, |
| 87 | 87 const security_state::SecurityInfo& security_info); |
| 88 // Returns the type of the bubble being shown. | 88 // Returns the type of the bubble being shown. |
| 89 static BubbleType GetShownBubbleType(); | 89 static BubbleType GetShownBubbleType(); |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 friend class test::PageInfoBubbleViewTestApi; | 92 friend class test::PageInfoBubbleViewTestApi; |
| 93 | 93 |
| 94 PageInfoBubbleView(views::View* anchor_view, | 94 PageInfoBubbleView(views::View* anchor_view, |
| 95 gfx::NativeView parent_window, | 95 gfx::NativeView parent_window, |
| 96 Profile* profile, | 96 Profile* profile, |
| 97 content::WebContents* web_contents, | 97 content::WebContents* web_contents, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // permissions section, and keep those views updated when the underlying | 175 // permissions section, and keep those views updated when the underlying |
| 176 // |Permission| changes. | 176 // |Permission| changes. |
| 177 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; | 177 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; |
| 178 | 178 |
| 179 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_; | 179 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_; |
| 180 | 180 |
| 181 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); | 181 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ | 184 #endif // CHROME_BROWSER_UI_VIEWS_PAGE_INFO_PAGE_INFO_BUBBLE_VIEW_H_ |
| OLD | NEW |