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

Side by Side Diff: ash/shell.cc

Issue 1547223002: Convert Pass()→std::move() in //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « ash/shelf/shelf_window_watcher.cc ('k') | ash/shell/app_list.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility>
9 10
10 #include "ash/accelerators/accelerator_controller.h" 11 #include "ash/accelerators/accelerator_controller.h"
11 #include "ash/accelerators/accelerator_delegate.h" 12 #include "ash/accelerators/accelerator_delegate.h"
12 #include "ash/accelerators/focus_manager_factory.h" 13 #include "ash/accelerators/focus_manager_factory.h"
13 #include "ash/accelerators/nested_accelerator_delegate.h" 14 #include "ash/accelerators/nested_accelerator_delegate.h"
14 #include "ash/ash_switches.h" 15 #include "ash/ash_switches.h"
15 #include "ash/autoclick/autoclick_controller.h" 16 #include "ash/autoclick/autoclick_controller.h"
16 #include "ash/desktop_background/desktop_background_controller.h" 17 #include "ash/desktop_background/desktop_background_controller.h"
17 #include "ash/desktop_background/desktop_background_view.h" 18 #include "ash/desktop_background/desktop_background_view.h"
18 #include "ash/desktop_background/user_wallpaper_delegate.h" 19 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get())); 582 shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get()));
582 scoped_ptr<ShelfItemDelegate> controller(new AppListShelfItemDelegate); 583 scoped_ptr<ShelfItemDelegate> controller(new AppListShelfItemDelegate);
583 584
584 // Finding the shelf model's location of the app list and setting its 585 // Finding the shelf model's location of the app list and setting its
585 // ShelfItemDelegate. 586 // ShelfItemDelegate.
586 int app_list_index = shelf_model_->GetItemIndexForType(TYPE_APP_LIST); 587 int app_list_index = shelf_model_->GetItemIndexForType(TYPE_APP_LIST);
587 DCHECK_GE(app_list_index, 0); 588 DCHECK_GE(app_list_index, 0);
588 ShelfID app_list_id = shelf_model_->items()[app_list_index].id; 589 ShelfID app_list_id = shelf_model_->items()[app_list_index].id;
589 DCHECK(app_list_id); 590 DCHECK(app_list_id);
590 shelf_item_delegate_manager_->SetShelfItemDelegate(app_list_id, 591 shelf_item_delegate_manager_->SetShelfItemDelegate(app_list_id,
591 controller.Pass()); 592 std::move(controller));
592 shelf_window_watcher_.reset(new ShelfWindowWatcher( 593 shelf_window_watcher_.reset(new ShelfWindowWatcher(
593 shelf_model_.get(), shelf_item_delegate_manager_.get())); 594 shelf_model_.get(), shelf_item_delegate_manager_.get()));
594 } 595 }
595 return shelf_delegate_.get(); 596 return shelf_delegate_.get();
596 } 597 }
597 598
598 void Shell::SetTouchHudProjectionEnabled(bool enabled) { 599 void Shell::SetTouchHudProjectionEnabled(bool enabled) {
599 if (is_touch_hud_projection_enabled_ == enabled) 600 if (is_touch_hud_projection_enabled_ == enabled)
600 return; 601 return;
601 602
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 929
929 // ui::UserActivityDetector passes events to observers, so let them get 930 // ui::UserActivityDetector passes events to observers, so let them get
930 // rewritten first. 931 // rewritten first.
931 user_activity_detector_.reset(new ui::UserActivityDetector); 932 user_activity_detector_.reset(new ui::UserActivityDetector);
932 933
933 overlay_filter_.reset(new OverlayEventFilter); 934 overlay_filter_.reset(new OverlayEventFilter);
934 AddPreTargetHandler(overlay_filter_.get()); 935 AddPreTargetHandler(overlay_filter_.get());
935 AddShellObserver(overlay_filter_.get()); 936 AddShellObserver(overlay_filter_.get());
936 937
937 accelerator_filter_.reset(new ::wm::AcceleratorFilter( 938 accelerator_filter_.reset(new ::wm::AcceleratorFilter(
938 scoped_ptr< ::wm::AcceleratorDelegate>(new AcceleratorDelegate).Pass(), 939 scoped_ptr<::wm::AcceleratorDelegate>(new AcceleratorDelegate),
939 accelerator_controller_->accelerator_history())); 940 accelerator_controller_->accelerator_history()));
940 AddPreTargetHandler(accelerator_filter_.get()); 941 AddPreTargetHandler(accelerator_filter_.get());
941 942
942 event_transformation_handler_.reset(new EventTransformationHandler); 943 event_transformation_handler_.reset(new EventTransformationHandler);
943 AddPreTargetHandler(event_transformation_handler_.get()); 944 AddPreTargetHandler(event_transformation_handler_.get());
944 945
945 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); 946 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler);
946 947
947 system_gesture_filter_.reset(new SystemGestureEventFilter); 948 system_gesture_filter_.reset(new SystemGestureEventFilter);
948 AddPreTargetHandler(system_gesture_filter_.get()); 949 AddPreTargetHandler(system_gesture_filter_.get());
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1169
1169 void Shell::OnWindowActivated( 1170 void Shell::OnWindowActivated(
1170 aura::client::ActivationChangeObserver::ActivationReason reason, 1171 aura::client::ActivationChangeObserver::ActivationReason reason,
1171 aura::Window* gained_active, 1172 aura::Window* gained_active,
1172 aura::Window* lost_active) { 1173 aura::Window* lost_active) {
1173 if (gained_active) 1174 if (gained_active)
1174 target_root_window_ = gained_active->GetRootWindow(); 1175 target_root_window_ = gained_active->GetRootWindow();
1175 } 1176 }
1176 1177
1177 } // namespace ash 1178 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_window_watcher.cc ('k') | ash/shell/app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698