| 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 27 matching lines...) Expand all Loading... |
| 38 struct SecurityInfo; | 38 struct SecurityInfo; |
| 39 } // namespace security_state | 39 } // namespace security_state |
| 40 | 40 |
| 41 namespace test { | 41 namespace test { |
| 42 class PageInfoBubbleViewTestApi; | 42 class PageInfoBubbleViewTestApi; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace views { | 45 namespace views { |
| 46 class Link; | 46 class Link; |
| 47 class Widget; | 47 class Widget; |
| 48 class WidgetObserver; |
| 48 } | 49 } |
| 49 | 50 |
| 50 enum : int { | 51 enum : int { |
| 51 // Left icon margin. | 52 // Left icon margin. |
| 52 kPermissionIconMarginLeft = 6, | 53 kPermissionIconMarginLeft = 6, |
| 53 // The width of the column that contains the permissions icons. | 54 // The width of the column that contains the permissions icons. |
| 54 kPermissionIconColumnWidth = 16, | 55 kPermissionIconColumnWidth = 16, |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 // The views implementation of the page info UI. | 58 // The views implementation of the page info UI. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 70 enum BubbleType { | 71 enum BubbleType { |
| 71 BUBBLE_NONE, | 72 BUBBLE_NONE, |
| 72 // Usual page info bubble for websites. | 73 // Usual page info bubble for websites. |
| 73 BUBBLE_PAGE_INFO, | 74 BUBBLE_PAGE_INFO, |
| 74 // Custom bubble for internal pages like chrome:// and chrome-extensions://. | 75 // Custom bubble for internal pages like chrome:// and chrome-extensions://. |
| 75 BUBBLE_INTERNAL_PAGE | 76 BUBBLE_INTERNAL_PAGE |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 // 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. |
| 79 static void ShowBubble(views::View* anchor_view, | 80 static void ShowBubble(views::View* anchor_view, |
| 81 views::WidgetObserver* widget_observer, |
| 80 const gfx::Rect& anchor_rect, | 82 const gfx::Rect& anchor_rect, |
| 81 Profile* profile, | 83 Profile* profile, |
| 82 content::WebContents* web_contents, | 84 content::WebContents* web_contents, |
| 83 const GURL& url, | 85 const GURL& url, |
| 84 const security_state::SecurityInfo& security_info); | 86 const security_state::SecurityInfo& security_info); |
| 85 | 87 |
| 86 // Returns the type of the bubble being shown. | 88 // Returns the type of the bubble being shown. |
| 87 static BubbleType GetShownBubbleType(); | 89 static BubbleType GetShownBubbleType(); |
| 88 | 90 |
| 89 private: | 91 private: |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // permissions section, and keep those views updated when the underlying | 175 // permissions section, and keep those views updated when the underlying |
| 174 // |Permission| changes. | 176 // |Permission| changes. |
| 175 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; | 177 std::vector<std::unique_ptr<PermissionSelectorRow>> selector_rows_; |
| 176 | 178 |
| 177 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_; | 179 base::WeakPtrFactory<PageInfoBubbleView> weak_factory_; |
| 178 | 180 |
| 179 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); | 181 DISALLOW_COPY_AND_ASSIGN(PageInfoBubbleView); |
| 180 }; | 182 }; |
| 181 | 183 |
| 182 #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 |