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

Side by Side Diff: athena/system/status_icon_container_view.cc

Issue 665803003: Revert of Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « athena/system/status_icon_container_view.h ('k') | athena/system/system_ui_impl.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/system/status_icon_container_view.h" 5 #include "athena/system/status_icon_container_view.h"
6 6
7 #include "athena/resources/athena_resources.h" 7 #include "athena/resources/athena_resources.h"
8 #include "athena/system/network_selector.h" 8 #include "athena/system/network_selector.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 private: 203 private:
204 SystemUI::ColorScheme color_scheme_; 204 SystemUI::ColorScheme color_scheme_;
205 views::ImageView* icon_; 205 views::ImageView* icon_;
206 206
207 DISALLOW_COPY_AND_ASSIGN(UpdateStatus); 207 DISALLOW_COPY_AND_ASSIGN(UpdateStatus);
208 }; 208 };
209 209
210 StatusIconContainerView::StatusIconContainerView( 210 StatusIconContainerView::StatusIconContainerView(
211 SystemUI::ColorScheme color_scheme) { 211 SystemUI::ColorScheme color_scheme,
212 aura::Window* system_modal_container)
213 : system_modal_container_(system_modal_container) {
212 const int kHorizontalSpacing = 10; 214 const int kHorizontalSpacing = 10;
213 const int kVerticalSpacing = 3; 215 const int kVerticalSpacing = 3;
214 const int kBetweenChildSpacing = 10; 216 const int kBetweenChildSpacing = 10;
215 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 217 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
216 kHorizontalSpacing, 218 kHorizontalSpacing,
217 kVerticalSpacing, 219 kVerticalSpacing,
218 kBetweenChildSpacing)); 220 kBetweenChildSpacing));
219 221
220 std::string version_text = 222 std::string version_text =
221 base::StringPrintf("%s (Build %s)", PRODUCT_VERSION, LAST_CHANGE); 223 base::StringPrintf("%s (Build %s)", PRODUCT_VERSION, LAST_CHANGE);
(...skipping 10 matching lines...) Expand all
232 234
233 views::ImageView* update_view = new views::ImageView(); 235 views::ImageView* update_view = new views::ImageView();
234 AddChildView(update_view); 236 AddChildView(update_view);
235 update_status_.reset(new UpdateStatus(color_scheme, update_view)); 237 update_status_.reset(new UpdateStatus(color_scheme, update_view));
236 } 238 }
237 239
238 StatusIconContainerView::~StatusIconContainerView() { 240 StatusIconContainerView::~StatusIconContainerView() {
239 } 241 }
240 242
241 bool StatusIconContainerView::OnMousePressed(const ui::MouseEvent& event) { 243 bool StatusIconContainerView::OnMousePressed(const ui::MouseEvent& event) {
242 CreateNetworkSelector(); 244 CreateNetworkSelector(system_modal_container_);
243 return true; 245 return true;
244 } 246 }
245 247
246 void StatusIconContainerView::OnGestureEvent(ui::GestureEvent* event) { 248 void StatusIconContainerView::OnGestureEvent(ui::GestureEvent* event) {
247 if (event->type() == ui::ET_GESTURE_TAP) { 249 if (event->type() == ui::ET_GESTURE_TAP) {
248 CreateNetworkSelector(); 250 CreateNetworkSelector(system_modal_container_);
249 event->SetHandled(); 251 event->SetHandled();
250 } 252 }
251 } 253 }
252 254
253 void StatusIconContainerView::ChildPreferredSizeChanged(views::View* child) { 255 void StatusIconContainerView::ChildPreferredSizeChanged(views::View* child) {
254 PreferredSizeChanged(); 256 PreferredSizeChanged();
255 } 257 }
256 258
257 } // namespace athena 259 } // namespace athena
OLDNEW
« no previous file with comments | « athena/system/status_icon_container_view.h ('k') | athena/system/system_ui_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698