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

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: one wrong conversion 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 confirm_callback_(confirm_callback) { 121 confirm_callback_(confirm_callback) {
122 DCHECK(controller); 122 DCHECK(controller);
123 parent_ = controller_->GetAppListWindow(); 123 parent_ = controller_->GetAppListWindow();
124 if (parent_) 124 if (parent_)
125 parent_window_tracker_ = NativeWindowTracker::Create(parent_); 125 parent_window_tracker_ = NativeWindowTracker::Create(parent_);
126 126
127 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); 127 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
128 128
129 SetLayoutManager(new views::BoxLayout( 129 SetLayoutManager(new views::BoxLayout(
130 views::BoxLayout::kHorizontal, 130 views::BoxLayout::kHorizontal,
131 provider->GetDistanceMetric(DISTANCE_DIALOG_BUTTON_MARGIN),
132 provider->GetDistanceMetric( 131 provider->GetDistanceMetric(
133 DISTANCE_PANEL_CONTENT_MARGIN), 132 views::DISTANCE_DIALOG_CONTENTS_HORIZONTAL_MARGIN),
134 provider->GetDistanceMetric( 133 provider->GetDistanceMetric(
135 views::DISTANCE_RELATED_CONTROL_HORIZONTAL))); 134 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
135 provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_HORIZONTAL)));
136 136
137 icon_view_ = new views::ImageView(); 137 icon_view_ = new views::ImageView();
138 icon_view_->set_preferred_size(gfx::Size(kIconSize, kIconSize)); 138 icon_view_->set_preferred_size(gfx::Size(kIconSize, kIconSize));
139 AddChildView(icon_view_); 139 AddChildView(icon_view_);
140 140
141 views::View* text_container = new views::View(); 141 views::View* text_container = new views::View();
142 views::BoxLayout* text_container_layout = 142 views::BoxLayout* text_container_layout =
143 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); 143 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0);
144 text_container_layout->set_main_axis_alignment( 144 text_container_layout->set_main_axis_alignment(
145 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER); 145 views::BoxLayout::MAIN_AXIS_ALIGNMENT_CENTER);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 bool CloseAppDialogViewAndConfirmForTest(bool confirm) { 284 bool CloseAppDialogViewAndConfirmForTest(bool confirm) {
285 if (!g_current_arc_app_dialog_view) 285 if (!g_current_arc_app_dialog_view)
286 return false; 286 return false;
287 287
288 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm); 288 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm);
289 return true; 289 return true;
290 } 290 }
291 291
292 } // namespace arc 292 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698