| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h" | 5 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 allow_(nullptr), | 208 allow_(nullptr), |
| 209 deny_(nullptr) { | 209 deny_(nullptr) { |
| 210 DCHECK(!requests.empty()); | 210 DCHECK(!requests.empty()); |
| 211 | 211 |
| 212 set_close_on_esc(true); | 212 set_close_on_esc(true); |
| 213 set_close_on_deactivate(false); | 213 set_close_on_deactivate(false); |
| 214 | 214 |
| 215 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, | 215 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, |
| 216 kItemMajorSpacing)); | 216 kItemMajorSpacing)); |
| 217 | 217 |
| 218 display_origin_ = url_formatter::FormatUrlForSecurityDisplay( | 218 display_origin_ = url_formatter::FormatUrlForSecurityDisplayOmitScheme( |
| 219 requests[0]->GetOrigin(), languages); | 219 requests[0]->GetOrigin(), languages); |
| 220 | 220 |
| 221 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 221 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 222 for (size_t index = 0; index < requests.size(); index++) { | 222 for (size_t index = 0; index < requests.size(); index++) { |
| 223 DCHECK(index < accept_state.size()); | 223 DCHECK(index < accept_state.size()); |
| 224 // The row is laid out containing a leading-aligned label area and a | 224 // The row is laid out containing a leading-aligned label area and a |
| 225 // trailing column which will be filled if there are multiple permission | 225 // trailing column which will be filled if there are multiple permission |
| 226 // requests. | 226 // requests. |
| 227 views::View* row = new views::View(); | 227 views::View* row = new views::View(); |
| 228 views::GridLayout* row_layout = new views::GridLayout(row); | 228 views::GridLayout* row_layout = new views::GridLayout(row); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 void PermissionBubbleViewViews::Accept() { | 499 void PermissionBubbleViewViews::Accept() { |
| 500 if (delegate_) | 500 if (delegate_) |
| 501 delegate_->Accept(); | 501 delegate_->Accept(); |
| 502 } | 502 } |
| 503 | 503 |
| 504 void PermissionBubbleViewViews::Deny() { | 504 void PermissionBubbleViewViews::Deny() { |
| 505 if (delegate_) | 505 if (delegate_) |
| 506 delegate_->Deny(); | 506 delegate_->Deny(); |
| 507 } | 507 } |
| OLD | NEW |