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

Side by Side Diff: chrome/browser/instant/instant_unload_handler.cc

Issue 11262015: Remove unused / unnecessary stuff from Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SuggestedTextView entirely Created 8 years, 2 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 | Annotate | Revision Log
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/instant/instant_unload_handler.h" 5 #include "chrome/browser/instant/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"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 private: 45 private:
46 InstantUnloadHandler* const handler_; 46 InstantUnloadHandler* const handler_;
47 scoped_ptr<TabContents> tab_contents_; 47 scoped_ptr<TabContents> tab_contents_;
48 48
49 // The index |tab_contents_| was originally at. If we add the tab back we add 49 // The index |tab_contents_| was originally at. If we add the tab back we add
50 // it at this index. 50 // it at this index.
51 const int index_; 51 const int index_;
52 52
53 DISALLOW_IMPLICIT_CONSTRUCTORS(WebContentsDelegateImpl); 53 DISALLOW_COPY_AND_ASSIGN(WebContentsDelegateImpl);
54 }; 54 };
55 55
56 InstantUnloadHandler::InstantUnloadHandler(Browser* browser) 56 InstantUnloadHandler::InstantUnloadHandler(Browser* browser)
57 : browser_(browser) { 57 : browser_(browser) {
58 } 58 }
59 59
60 InstantUnloadHandler::~InstantUnloadHandler() { 60 InstantUnloadHandler::~InstantUnloadHandler() {
61 } 61 }
62 62
63 void InstantUnloadHandler::RunUnloadListenersOrDestroy(TabContents* tab, 63 void InstantUnloadHandler::RunUnloadListenersOrDestroy(TabContents* tab,
(...skipping 30 matching lines...) Expand all
94 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) { 94 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) {
95 ScopedVector<WebContentsDelegateImpl>::iterator i = 95 ScopedVector<WebContentsDelegateImpl>::iterator i =
96 std::find(delegates_.begin(), delegates_.end(), delegate); 96 std::find(delegates_.begin(), delegates_.end(), delegate);
97 DCHECK(i != delegates_.end()); 97 DCHECK(i != delegates_.end());
98 98
99 // The delegate's method is a caller on the stack, so schedule the deletion 99 // The delegate's method is a caller on the stack, so schedule the deletion
100 // for later. 100 // for later.
101 delegates_.weak_erase(i); 101 delegates_.weak_erase(i);
102 MessageLoop::current()->DeleteSoon(FROM_HERE, delegate); 102 MessageLoop::current()->DeleteSoon(FROM_HERE, delegate);
103 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.h ('k') | chrome/browser/ui/browser_instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698