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

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 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 (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 "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" 5 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 protected: 62 protected:
63 void ScheduleFindNewParentIfDetached(aura::Window* root_window) { 63 void ScheduleFindNewParentIfDetached(aura::Window* root_window) {
64 if (root_window) 64 if (root_window)
65 return; 65 return;
66 // Post a task to return to the event loop before finding a new parent, to 66 // Post a task to return to the event loop before finding a new parent, to
67 // avoid clashing with the currently-in-progress window tree hierarchy 67 // avoid clashing with the currently-in-progress window tree hierarchy
68 // changes. 68 // changes.
69 base::ThreadTaskRunnerHandle::Get()->PostTask( 69 base::ThreadTaskRunnerHandle::Get()->PostTask(
70 FROM_HERE, 70 FROM_HERE, base::BindOnce(&WindowAdoptionAgent::FindNewParent,
71 base::Bind(&WindowAdoptionAgent::FindNewParent, 71 weak_ptr_factory_.GetWeakPtr()));
72 weak_ptr_factory_.GetWeakPtr()));
73 } 72 }
74 73
75 // aura::WindowObserver: 74 // aura::WindowObserver:
76 void OnWindowDestroyed(aura::Window* window) final { 75 void OnWindowDestroyed(aura::Window* window) final {
77 DCHECK_EQ(content_window_, window); 76 DCHECK_EQ(content_window_, window);
78 content_window_ = nullptr; 77 content_window_ = nullptr;
79 } 78 }
80 79
81 void OnWindowRemovingFromRootWindow(aura::Window* window, 80 void OnWindowRemovingFromRootWindow(aura::Window* window,
82 aura::Window* new_root) final { 81 aura::Window* new_root) final {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 it != requests_.end(); ++it) { 463 it != requests_.end(); ++it) {
465 if (it->get() == request) { 464 if (it->get() == request) {
466 requests_.erase(it); 465 requests_.erase(it);
467 return; 466 return;
468 } 467 }
469 } 468 }
470 NOTREACHED(); 469 NOTREACHED();
471 } 470 }
472 471
473 } // namespace extensions 472 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698