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

Side by Side Diff: chrome/browser/ui/search/instant_unload_handler.cc

Issue 12520005: Move desktop-specific Instant bits to c/b/ui/search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/instant/instant_unload_handler.h" 5 #include "chrome/browser/ui/search/instant_unload_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_contents_delegate.h" 13 #include "content/public/browser/web_contents_delegate.h"
14 14
15 class InstantUnloadHandler::WebContentsDelegateImpl 15 class InstantUnloadHandler::WebContentsDelegateImpl
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) { 97 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) {
98 ScopedVector<WebContentsDelegateImpl>::iterator i = 98 ScopedVector<WebContentsDelegateImpl>::iterator i =
99 std::find(delegates_.begin(), delegates_.end(), delegate); 99 std::find(delegates_.begin(), delegates_.end(), delegate);
100 DCHECK(i != delegates_.end()); 100 DCHECK(i != delegates_.end());
101 101
102 // The delegate's method is a caller on the stack, so schedule the deletion 102 // The delegate's method is a caller on the stack, so schedule the deletion
103 // for later. 103 // for later.
104 delegates_.weak_erase(i); 104 delegates_.weak_erase(i);
105 MessageLoop::current()->DeleteSoon(FROM_HERE, delegate); 105 MessageLoop::current()->DeleteSoon(FROM_HERE, delegate);
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_unload_handler.h ('k') | chrome/browser/ui/views/frame/instant_overlay_controller_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698