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

Side by Side Diff: chrome/browser/ui/views/download/download_danger_prompt_views.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/download/download_danger_prompt.h" 5 #include "chrome/browser/download/download_danger_prompt.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "chrome/browser/download/download_stats.h" 8 #include "chrome/browser/download/download_stats.h"
9 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h" 9 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h"
10 #include "chrome/grit/chromium_strings.h" 10 #include "chrome/grit/chromium_strings.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 : download_(item), 88 : download_(item),
89 show_context_(show_context), 89 show_context_(show_context),
90 done_(done), 90 done_(done),
91 contents_view_(NULL) { 91 contents_view_(NULL) {
92 DCHECK(!done_.is_null()); 92 DCHECK(!done_.is_null());
93 download_->AddObserver(this); 93 download_->AddObserver(this);
94 94
95 contents_view_ = new views::View; 95 contents_view_ = new views::View;
96 96
97 views::GridLayout* layout = views::GridLayout::CreatePanel(contents_view_); 97 views::GridLayout* layout = views::GridLayout::CreatePanel(contents_view_);
98 contents_view_->SetLayoutManager(layout);
99 98
100 views::ColumnSet* column_set = layout->AddColumnSet(0); 99 views::ColumnSet* column_set = layout->AddColumnSet(0);
101 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 100 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
102 views::GridLayout::FIXED, kMessageWidth, 0); 101 views::GridLayout::FIXED, kMessageWidth, 0);
103 102
104 views::Label* message_body_label = new views::Label(GetMessageBody()); 103 views::Label* message_body_label = new views::Label(GetMessageBody());
105 message_body_label->SetMultiLine(true); 104 message_body_label->SetMultiLine(true);
106 message_body_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 105 message_body_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
107 message_body_label->SetAllowCharacterBreak(true); 106 message_body_label->SetAllowCharacterBreak(true);
108 107
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 content::DownloadItem* item, 342 content::DownloadItem* item,
344 content::WebContents* web_contents, 343 content::WebContents* web_contents,
345 bool show_context, 344 bool show_context,
346 const OnDone& done) { 345 const OnDone& done) {
347 DownloadDangerPromptViews* download_danger_prompt = 346 DownloadDangerPromptViews* download_danger_prompt =
348 new DownloadDangerPromptViews(item, show_context, done); 347 new DownloadDangerPromptViews(item, show_context, done);
349 constrained_window::ShowWebModalDialogViews(download_danger_prompt, 348 constrained_window::ShowWebModalDialogViews(download_danger_prompt,
350 web_contents); 349 web_contents);
351 return download_danger_prompt; 350 return download_danger_prompt;
352 } 351 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698