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