Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: chrome/browser/ui/views/website_settings/permissions_bubble_view.cc

Issue 891803002: Padding tweak to permission bubble customization mode [Views] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Memory fail Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 views::View* button_row = new views::View(); 290 views::View* button_row = new views::View();
291 views::GridLayout* button_layout = new views::GridLayout(button_row); 291 views::GridLayout* button_layout = new views::GridLayout(button_row);
292 views::ColumnSet* columns = button_layout->AddColumnSet(0); 292 views::ColumnSet* columns = button_layout->AddColumnSet(0);
293 button_row->SetLayoutManager(button_layout); 293 button_row->SetLayoutManager(button_layout);
294 AddChildView(button_row); 294 AddChildView(button_row);
295 295
296 // Customization case: just an "OK" button 296 // Customization case: just an "OK" button
297 if (customization_mode) { 297 if (customization_mode) {
298 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 298 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL,
299 100, views::GridLayout::USE_PREF, 0, 0); 299 100, views::GridLayout::USE_PREF, 0, 0);
300 button_layout->StartRow(0, 0); 300 button_layout->StartRowWithPadding(0, 0, 0, 4);
301 views::LabelButton* ok_button = 301 views::LabelButton* ok_button =
302 new views::LabelButton(this, l10n_util::GetStringUTF16(IDS_OK)); 302 new views::LabelButton(this, l10n_util::GetStringUTF16(IDS_OK));
303 ok_button->SetStyle(views::Button::STYLE_BUTTON); 303 ok_button->SetStyle(views::Button::STYLE_BUTTON);
304 button_layout->AddView(ok_button); 304 button_layout->AddView(ok_button);
305 allow_ = ok_button; 305 allow_ = ok_button;
306 306
307 button_layout->AddPaddingRow(0, kBubbleOuterMargin); 307 button_layout->AddPaddingRow(0, kBubbleOuterMargin);
308 return; 308 return;
309 } 309 }
310 310
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 void PermissionBubbleViewViews::Deny() { 484 void PermissionBubbleViewViews::Deny() {
485 if (delegate_) 485 if (delegate_)
486 delegate_->Deny(); 486 delegate_->Deny();
487 } 487 }
488 488
489 void PermissionBubbleViewViews::SetCustomizationMode() { 489 void PermissionBubbleViewViews::SetCustomizationMode() {
490 if (delegate_) 490 if (delegate_)
491 delegate_->SetCustomizationMode(); 491 delegate_->SetCustomizationMode();
492 } 492 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698