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

Side by Side Diff: athena/wm/window_overview_mode.cc

Issue 715053003: Introduce system_info as an independent container. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup includes Created 6 years, 1 month 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/util/container_priorities.h ('k') | no next file » | 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/wm/window_overview_mode.h" 5 #include "athena/wm/window_overview_mode.h"
6 6
7 #include <complex> 7 #include <complex>
8 #include <vector> 8 #include <vector>
9 9
10 #include "athena/util/athena_constants.h"
10 #include "athena/wm/overview_toolbar.h" 11 #include "athena/wm/overview_toolbar.h"
11 #include "athena/wm/public/window_list_provider.h" 12 #include "athena/wm/public/window_list_provider.h"
12 #include "athena/wm/public/window_list_provider_observer.h" 13 #include "athena/wm/public/window_list_provider_observer.h"
13 #include "athena/wm/split_view_controller.h" 14 #include "athena/wm/split_view_controller.h"
14 #include "base/bind.h" 15 #include "base/bind.h"
15 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
16 #include "ui/aura/scoped_window_targeter.h" 17 #include "ui/aura/scoped_window_targeter.h"
17 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
18 #include "ui/aura/window_delegate.h" 19 #include "ui/aura/window_delegate.h"
19 #include "ui/aura/window_property.h" 20 #include "ui/aura/window_property.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // Computes the terminal states (i.e. the transforms for the top-most and 357 // Computes the terminal states (i.e. the transforms for the top-most and
357 // bottom-most position in the stack) for |window|. |window_count| is the 358 // bottom-most position in the stack) for |window|. |window_count| is the
358 // number of windows in the stack, and |index| is the position of the window 359 // number of windows in the stack, and |index| is the position of the window
359 // in the stack (0 being the front-most window). 360 // in the stack (0 being the front-most window).
360 void UpdateTerminalStateForWindowAtIndex(aura::Window* window, 361 void UpdateTerminalStateForWindowAtIndex(aura::Window* window,
361 size_t index, 362 size_t index,
362 size_t window_count) { 363 size_t window_count) {
363 const int kGapBetweenWindowsBottom = 10; 364 const int kGapBetweenWindowsBottom = 10;
364 const int kGapBetweenWindowsTop = 5; 365 const int kGapBetweenWindowsTop = 5;
365 366
366 int top = (window_count - index - 1) * kGapBetweenWindowsTop; 367 int top =
368 (window_count - index - 1) * kGapBetweenWindowsTop + kSystemUIHeight;
367 int bottom = GetScrollableHeight() - (index * kGapBetweenWindowsBottom); 369 int bottom = GetScrollableHeight() - (index * kGapBetweenWindowsBottom);
368 370
369 WindowOverviewState* state = window->GetProperty(kWindowOverviewState); 371 WindowOverviewState* state = window->GetProperty(kWindowOverviewState);
370 CHECK(state); 372 CHECK(state);
371 if (state->split) 373 if (state->split)
372 return; 374 return;
373 state->min_y = top; 375 state->min_y = top;
374 state->max_y = bottom - window->bounds().y(); 376 state->max_y = bottom - window->bounds().y();
375 state->progress = 0.f; 377 state->progress = 0.f;
376 } 378 }
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 aura::Window* container, 861 aura::Window* container,
860 WindowListProvider* window_list_provider, 862 WindowListProvider* window_list_provider,
861 SplitViewController* split_view_controller, 863 SplitViewController* split_view_controller,
862 WindowOverviewModeDelegate* delegate) { 864 WindowOverviewModeDelegate* delegate) {
863 return scoped_ptr<WindowOverviewMode>( 865 return scoped_ptr<WindowOverviewMode>(
864 new WindowOverviewModeImpl(container, window_list_provider, 866 new WindowOverviewModeImpl(container, window_list_provider,
865 split_view_controller, delegate)); 867 split_view_controller, delegate));
866 } 868 }
867 869
868 } // namespace athena 870 } // namespace athena
OLDNEW
« no previous file with comments | « athena/util/container_priorities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698