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

Side by Side Diff: chrome/browser/first_run/try_chrome_dialog_view.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
« no previous file with comments | « chrome/browser/chromeos/ui/request_pin_view.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/first_run/try_chrome_dialog_view.h" 5 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 params.bounds = gfx::Rect(310, 200); 94 params.bounds = gfx::Rect(310, 200);
95 popup_ = new views::Widget; 95 popup_ = new views::Widget;
96 popup_->Init(params); 96 popup_->Init(params);
97 97
98 views::View* root_view = popup_->GetRootView(); 98 views::View* root_view = popup_->GetRootView();
99 // The window color is a tiny bit off-white. 99 // The window color is a tiny bit off-white.
100 root_view->set_background( 100 root_view->set_background(
101 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); 101 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc));
102 102
103 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); 103 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view);
104 root_view->SetLayoutManager(layout);
105 views::ColumnSet* columns; 104 views::ColumnSet* columns;
106 105
107 // First row: [icon][pad][text][pad][button]. 106 // First row: [icon][pad][text][pad][button].
108 columns = layout->AddColumnSet(0); 107 columns = layout->AddColumnSet(0);
109 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, 108 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
110 views::GridLayout::FIXED, icon_size.width(), 109 views::GridLayout::FIXED, icon_size.width(),
111 icon_size.height()); 110 icon_size.height());
112 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); 111 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing);
113 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 112 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
114 views::GridLayout::USE_PREF, 0, 0); 113 views::GridLayout::USE_PREF, 0, 0);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 result_ = TRY_CHROME_AS_DEFAULT; 361 result_ = TRY_CHROME_AS_DEFAULT;
363 } 362 }
364 363
365 popup_->Close(); 364 popup_->Close();
366 base::MessageLoop::current()->QuitWhenIdle(); 365 base::MessageLoop::current()->QuitWhenIdle();
367 } 366 }
368 367
369 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { 368 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) {
370 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); 369 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW);
371 } 370 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/request_pin_view.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698