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 "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" | 8 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" |
9 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse
rver.h" | 9 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse
rver.h" |
10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" | 10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 bool customization_mode) | 219 bool customization_mode) |
220 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_LEFT), | 220 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_LEFT), |
221 owner_(owner), | 221 owner_(owner), |
222 allow_(NULL), | 222 allow_(NULL), |
223 deny_(NULL), | 223 deny_(NULL), |
224 allow_combobox_(NULL) { | 224 allow_combobox_(NULL) { |
225 DCHECK(!requests.empty()); | 225 DCHECK(!requests.empty()); |
226 | 226 |
227 RemoveAllChildViews(true); | 227 RemoveAllChildViews(true); |
228 customize_comboboxes_.clear(); | 228 customize_comboboxes_.clear(); |
229 set_close_on_esc(false); | 229 set_close_on_esc(true); |
230 set_close_on_deactivate(false); | 230 set_close_on_deactivate(false); |
231 | 231 |
232 SetLayoutManager(new views::BoxLayout( | 232 SetLayoutManager(new views::BoxLayout( |
233 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing)); | 233 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing)); |
234 | 234 |
235 // TODO(gbillock): support other languages than English. | 235 // TODO(gbillock): support other languages than English. |
236 hostname_ = net::FormatUrl(requests[0]->GetRequestingHostname(), | 236 hostname_ = net::FormatUrl(requests[0]->GetRequestingHostname(), |
237 "en", | 237 "en", |
238 net::kFormatUrlOmitUsernamePassword | | 238 net::kFormatUrlOmitUsernamePassword | |
239 net::kFormatUrlOmitTrailingSlashOnBareHostname, | 239 net::kFormatUrlOmitTrailingSlashOnBareHostname, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 479 |
480 void PermissionBubbleViewViews::Deny() { | 480 void PermissionBubbleViewViews::Deny() { |
481 if (delegate_) | 481 if (delegate_) |
482 delegate_->Deny(); | 482 delegate_->Deny(); |
483 } | 483 } |
484 | 484 |
485 void PermissionBubbleViewViews::SetCustomizationMode() { | 485 void PermissionBubbleViewViews::SetCustomizationMode() { |
486 if (delegate_) | 486 if (delegate_) |
487 delegate_->SetCustomizationMode(); | 487 delegate_->SetCustomizationMode(); |
488 } | 488 } |
OLD | NEW |