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

Side by Side Diff: chrome/browser/ui/views/global_error_bubble_view.cc

Issue 8586023: Fix Protector bubble layout for views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/global_error_bubble_view.h" 5 #include "chrome/browser/ui/views/global_error_bubble_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/global_error.h" 8 #include "chrome/browser/ui/global_error.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "chrome/browser/ui/views/toolbar_view.h" 10 #include "chrome/browser/ui/views/toolbar_view.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::LEADING, 91 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::LEADING,
92 0, views::GridLayout::USE_PREF, 0, 0); 92 0, views::GridLayout::USE_PREF, 0, 0);
93 93
94 layout->StartRow(1, 0); 94 layout->StartRow(1, 0);
95 layout->AddView(image_view.release()); 95 layout->AddView(image_view.release());
96 layout->AddView(title_label.release()); 96 layout->AddView(title_label.release());
97 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing); 97 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing);
98 98
99 layout->StartRow(1, 1); 99 layout->StartRow(1, 1);
100 layout->AddView(message_label_); 100 layout->AddView(message_label_);
101 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing); 101 layout->AddPaddingRow(0, views::kLabelToControlVerticalSpacing);
102 102
103 layout->StartRow(0, 2); 103 layout->StartRow(0, 2);
104 layout->AddView(accept_button.release()); 104 layout->AddView(accept_button.release());
105 if (cancel_button.get()) 105 if (cancel_button.get())
106 layout->AddView(cancel_button.release()); 106 layout->AddView(cancel_button.release());
107 else 107 else
108 layout->SkipColumns(1); 108 layout->SkipColumns(1);
109 } 109 }
110 110
111 GlobalErrorBubbleView::~GlobalErrorBubbleView() { 111 GlobalErrorBubbleView::~GlobalErrorBubbleView() {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 GlobalErrorBubbleView* bubble_view = 168 GlobalErrorBubbleView* bubble_view =
169 new GlobalErrorBubbleView(browser, error); 169 new GlobalErrorBubbleView(browser, error);
170 // Bubble::Show() takes ownership of the view. 170 // Bubble::Show() takes ownership of the view.
171 Bubble* bubble = Bubble::Show( 171 Bubble* bubble = Bubble::Show(
172 browser_view->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT, 172 browser_view->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT,
173 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view, 173 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view,
174 bubble_view); 174 bubble_view);
175 bubble_view->set_bubble(bubble); 175 bubble_view->set_bubble(bubble);
176 } 176 }
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