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

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

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: edits 2 Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/app_list/arc/arc_app_dialog.h" 5 #include "chrome/browser/ui/app_list/arc/arc_app_dialog.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_util.h" 10 #include "chrome/browser/extensions/extension_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 confirm_callback_(confirm_callback) { 134 confirm_callback_(confirm_callback) {
135 DCHECK(controller); 135 DCHECK(controller);
136 parent_ = controller_->GetAppListWindow(); 136 parent_ = controller_->GetAppListWindow();
137 if (parent_) 137 if (parent_)
138 parent_window_tracker_ = NativeWindowTracker::Create(parent_); 138 parent_window_tracker_ = NativeWindowTracker::Create(parent_);
139 139
140 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); 140 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
141 141
142 SetLayoutManager(new views::BoxLayout( 142 SetLayoutManager(new views::BoxLayout(
143 views::BoxLayout::kHorizontal, 143 views::BoxLayout::kHorizontal,
144 provider->GetDistanceMetric(DISTANCE_DIALOG_BUTTON_MARGIN),
145 provider->GetDistanceMetric( 144 provider->GetDistanceMetric(
146 DISTANCE_PANEL_CONTENT_MARGIN), 145 views::DISTANCE_DIALOG_CONTENTS_HORIZONTAL_MARGIN),
147 provider->GetDistanceMetric( 146 provider->GetDistanceMetric(
148 views::DISTANCE_RELATED_CONTROL_HORIZONTAL))); 147 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
148 provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_HORIZONTAL)));
149 149
150 icon_view_ = new FixedBoundarySizeImageView(); 150 icon_view_ = new FixedBoundarySizeImageView();
151 AddChildView(icon_view_); 151 AddChildView(icon_view_);
152 152
153 views::View* text_container = new views::View(); 153 views::View* text_container = new views::View();
154 views::BoxLayout* text_container_layout = 154 views::BoxLayout* text_container_layout =
155 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); 155 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0);
156 text_container_layout->set_main_axis_alignment( 156 text_container_layout->set_main_axis_alignment(
157 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); 157 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
158 text_container_layout->set_cross_axis_alignment( 158 text_container_layout->set_cross_axis_alignment(
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 bool CloseAppDialogViewAndConfirmForTest(bool confirm) { 295 bool CloseAppDialogViewAndConfirmForTest(bool confirm) {
296 if (!g_current_arc_app_dialog_view) 296 if (!g_current_arc_app_dialog_view)
297 return false; 297 return false;
298 298
299 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm); 299 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm);
300 return true; 300 return true;
301 } 301 }
302 302
303 } // namespace arc 303 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698