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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller_aura.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 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 "extensions/shell/browser/shell_desktop_controller_aura.h" 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 delegate->CommitMouseEventsEnabled(enabled); 143 delegate->CommitMouseEventsEnabled(enabled);
144 SetVisibility(delegate->IsCursorVisible(), delegate); 144 SetVisibility(delegate->IsCursorVisible(), delegate);
145 } 145 }
146 146
147 private: 147 private:
148 // Sets |cursor| as the active cursor within Aura. 148 // Sets |cursor| as the active cursor within Aura.
149 void ApplyCursor(gfx::NativeCursor cursor) { host_->SetCursor(cursor); } 149 void ApplyCursor(gfx::NativeCursor cursor) { host_->SetCursor(cursor); }
150 150
151 aura::WindowTreeHost* host_; // Not owned. 151 aura::WindowTreeHost* host_; // Not owned.
152 152
153 scoped_ptr<ui::ImageCursors> image_cursors_; 153 std::unique_ptr<ui::ImageCursors> image_cursors_;
154 154
155 DISALLOW_COPY_AND_ASSIGN(ShellNativeCursorManager); 155 DISALLOW_COPY_AND_ASSIGN(ShellNativeCursorManager);
156 }; 156 };
157 157
158 class AppsFocusRules : public wm::BaseFocusRules { 158 class AppsFocusRules : public wm::BaseFocusRules {
159 public: 159 public:
160 AppsFocusRules() {} 160 AppsFocusRules() {}
161 ~AppsFocusRules() override {} 161 ~AppsFocusRules() override {}
162 162
163 bool SupportsChildActivation(aura::Window* window) const override { 163 bool SupportsChildActivation(aura::Window* window) const override {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 aura::client::SetActivationClient(host_->window(), focus_controller); 276 aura::client::SetActivationClient(host_->window(), focus_controller);
277 focus_client_.reset(focus_controller); 277 focus_client_.reset(focus_controller);
278 278
279 capture_client_.reset( 279 capture_client_.reset(
280 new aura::client::DefaultCaptureClient(host_->window())); 280 new aura::client::DefaultCaptureClient(host_->window()));
281 281
282 // Ensure new windows fill the display. 282 // Ensure new windows fill the display.
283 host_->window()->SetLayoutManager(new FillLayout); 283 host_->window()->SetLayoutManager(new FillLayout);
284 284
285 cursor_manager_.reset( 285 cursor_manager_.reset(
286 new wm::CursorManager(scoped_ptr<wm::NativeCursorManager>( 286 new wm::CursorManager(std::unique_ptr<wm::NativeCursorManager>(
287 new ShellNativeCursorManager(host_.get())))); 287 new ShellNativeCursorManager(host_.get()))));
288 cursor_manager_->SetDisplay(gfx::Screen::GetScreen()->GetPrimaryDisplay()); 288 cursor_manager_->SetDisplay(gfx::Screen::GetScreen()->GetPrimaryDisplay());
289 cursor_manager_->SetCursor(ui::kCursorPointer); 289 cursor_manager_->SetCursor(ui::kCursorPointer);
290 aura::client::SetCursorClient(host_->window(), cursor_manager_.get()); 290 aura::client::SetCursorClient(host_->window(), cursor_manager_.get());
291 291
292 user_activity_detector_.reset(new ui::UserActivityDetector); 292 user_activity_detector_.reset(new ui::UserActivityDetector);
293 #if defined(OS_CHROMEOS) 293 #if defined(OS_CHROMEOS)
294 user_activity_notifier_.reset( 294 user_activity_notifier_.reset(
295 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); 295 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
296 #endif 296 #endif
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 if (displays.empty()) 355 if (displays.empty())
356 return gfx::Size(); 356 return gfx::Size();
357 const ui::DisplayMode* mode = displays[0]->current_mode(); 357 const ui::DisplayMode* mode = displays[0]->current_mode();
358 return mode ? mode->size() : gfx::Size(); 358 return mode ? mode->size() : gfx::Size();
359 #else 359 #else
360 return gfx::Size(); 360 return gfx::Size();
361 #endif 361 #endif
362 } 362 }
363 363
364 } // namespace extensions 364 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698