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

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

Issue 2762633003: Remove unused |context| from GetDefaultParent(). (Closed)
Patch Set: Fix chromecast compile error. 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 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Create a copy of the window vector, because closing the windows will 233 // Create a copy of the window vector, because closing the windows will
234 // trigger RemoveAppWindow, which will invalidate the iterator. 234 // trigger RemoveAppWindow, which will invalidate the iterator.
235 // This vector should be small enough that this should not be an issue. 235 // This vector should be small enough that this should not be an issue.
236 std::vector<AppWindow*> app_windows(app_windows_); 236 std::vector<AppWindow*> app_windows(app_windows_);
237 for (AppWindow* app_window : app_windows) 237 for (AppWindow* app_window : app_windows)
238 app_window->GetBaseWindow()->Close(); // Close() deletes |app_window|. 238 app_window->GetBaseWindow()->Close(); // Close() deletes |app_window|.
239 app_windows_.clear(); 239 app_windows_.clear();
240 } 240 }
241 241
242 aura::Window* ShellDesktopControllerAura::GetDefaultParent( 242 aura::Window* ShellDesktopControllerAura::GetDefaultParent(
243 aura::Window* context,
244 aura::Window* window, 243 aura::Window* window,
245 const gfx::Rect& bounds) { 244 const gfx::Rect& bounds) {
246 return host_->window(); 245 return host_->window();
247 } 246 }
248 247
249 #if defined(OS_CHROMEOS) 248 #if defined(OS_CHROMEOS)
250 void ShellDesktopControllerAura::PowerButtonEventReceived( 249 void ShellDesktopControllerAura::PowerButtonEventReceived(
251 bool down, 250 bool down,
252 const base::TimeTicks& timestamp) { 251 const base::TimeTicks& timestamp) {
253 if (down) { 252 if (down) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 if (displays.empty()) 390 if (displays.empty())
392 return gfx::Size(); 391 return gfx::Size();
393 const display::DisplayMode* mode = displays[0]->current_mode(); 392 const display::DisplayMode* mode = displays[0]->current_mode();
394 return mode ? mode->size() : gfx::Size(); 393 return mode ? mode->size() : gfx::Size();
395 #else 394 #else
396 return gfx::Size(); 395 return gfx::Size();
397 #endif 396 #endif
398 } 397 }
399 398
400 } // namespace extensions 399 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_desktop_controller_aura.h ('k') | headless/lib/browser/headless_window_parenting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698