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

Side by Side Diff: ash/common/wm/overview/window_selector.cc

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/common/wm/overview/window_selector.h" 5 #include "ash/common/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 20 matching lines...) Expand all
31 #include "base/command_line.h" 31 #include "base/command_line.h"
32 #include "base/metrics/histogram_macros.h" 32 #include "base/metrics/histogram_macros.h"
33 #include "third_party/skia/include/core/SkPath.h" 33 #include "third_party/skia/include/core/SkPath.h"
34 #include "ui/base/resource/resource_bundle.h" 34 #include "ui/base/resource/resource_bundle.h"
35 #include "ui/compositor/scoped_layer_animation_settings.h" 35 #include "ui/compositor/scoped_layer_animation_settings.h"
36 #include "ui/display/screen.h" 36 #include "ui/display/screen.h"
37 #include "ui/events/event.h" 37 #include "ui/events/event.h"
38 #include "ui/gfx/canvas.h" 38 #include "ui/gfx/canvas.h"
39 #include "ui/gfx/paint_vector_icon.h" 39 #include "ui/gfx/paint_vector_icon.h"
40 #include "ui/gfx/skia_util.h" 40 #include "ui/gfx/skia_util.h"
41 #include "ui/gfx/vector_icons_public.h" 41 #include "ui/vector_icons/vector_icons.h"
42 #include "ui/views/border.h" 42 #include "ui/views/border.h"
43 #include "ui/views/controls/image_view.h" 43 #include "ui/views/controls/image_view.h"
44 #include "ui/views/controls/textfield/textfield.h" 44 #include "ui/views/controls/textfield/textfield.h"
45 #include "ui/views/layout/box_layout.h" 45 #include "ui/views/layout/box_layout.h"
46 #include "ui/wm/public/activation_client.h" 46 #include "ui/wm/public/activation_client.h"
47 47
48 namespace ash { 48 namespace ash {
49 49
50 namespace { 50 namespace {
51 51
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 &restoring_minimized_windows_, true); 288 &restoring_minimized_windows_, true);
289 289
290 // Do not call PrepareForOverview until all items are added to window_list_ 290 // Do not call PrepareForOverview until all items are added to window_list_
291 // as we don't want to cause any window updates until all windows in 291 // as we don't want to cause any window updates until all windows in
292 // overview are observed. See http://crbug.com/384495. 292 // overview are observed. See http://crbug.com/384495.
293 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) { 293 for (std::unique_ptr<WindowGrid>& window_grid : grid_list_) {
294 window_grid->PrepareForOverview(); 294 window_grid->PrepareForOverview();
295 window_grid->PositionWindows(true); 295 window_grid->PositionWindows(true);
296 } 296 }
297 297
298 search_image_ = 298 search_image_ = gfx::CreateVectorIcon(ui::kSearchIcon, kTextFilterIconSize,
299 gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH, 299 kTextFilterIconColor);
300 kTextFilterIconSize, kTextFilterIconColor);
301 WmWindow* root_window = shell->GetPrimaryRootWindow(); 300 WmWindow* root_window = shell->GetPrimaryRootWindow();
302 text_filter_widget_.reset(CreateTextFilter(this, root_window, search_image_, 301 text_filter_widget_.reset(CreateTextFilter(this, root_window, search_image_,
303 &text_filter_bottom_)); 302 &text_filter_bottom_));
304 } 303 }
305 304
306 DCHECK(!grid_list_.empty()); 305 DCHECK(!grid_list_.empty());
307 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_); 306 UMA_HISTOGRAM_COUNTS_100("Ash.WindowSelector.Items", num_items_);
308 307
309 Shell::GetInstance()->activation_client()->AddObserver(this); 308 Shell::GetInstance()->activation_client()->AddObserver(this);
310 309
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 for (size_t i = 0; i <= grid_list_.size() && 680 for (size_t i = 0; i <= grid_list_.size() &&
682 grid_list_[selected_grid_index_]->Move(direction, animate); 681 grid_list_[selected_grid_index_]->Move(direction, animate);
683 i++) { 682 i++) {
684 selected_grid_index_ = 683 selected_grid_index_ =
685 (selected_grid_index_ + display_direction + grid_list_.size()) % 684 (selected_grid_index_ + display_direction + grid_list_.size()) %
686 grid_list_.size(); 685 grid_list_.size();
687 } 686 }
688 } 687 }
689 688
690 } // namespace ash 689 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/web_notification/web_notification_tray.cc ('k') | ash/resources/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698