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

Side by Side Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/ui/browser_tab_strip_model_delegate.h" 5 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/tab_restore_service.h" 10 #include "chrome/browser/sessions/tab_restore_service.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void BrowserTabStripModelDelegate::DuplicateContentsAt(int index) { 101 void BrowserTabStripModelDelegate::DuplicateContentsAt(int index) {
102 DuplicateTabAt(browser_, index); 102 DuplicateTabAt(browser_, index);
103 } 103 }
104 104
105 void BrowserTabStripModelDelegate::CloseFrameAfterDragSession() { 105 void BrowserTabStripModelDelegate::CloseFrameAfterDragSession() {
106 #if !defined(OS_MACOSX) 106 #if !defined(OS_MACOSX)
107 // This is scheduled to run after we return to the message loop because 107 // This is scheduled to run after we return to the message loop because
108 // otherwise the frame will think the drag session is still active and ignore 108 // otherwise the frame will think the drag session is still active and ignore
109 // the request. 109 // the request.
110 MessageLoop::current()->PostTask( 110 base::MessageLoop::current()->PostTask(
111 FROM_HERE, 111 FROM_HERE,
112 base::Bind(&BrowserTabStripModelDelegate::CloseFrame, 112 base::Bind(&BrowserTabStripModelDelegate::CloseFrame,
113 weak_factory_.GetWeakPtr())); 113 weak_factory_.GetWeakPtr()));
114 #endif 114 #endif
115 } 115 }
116 116
117 void BrowserTabStripModelDelegate::CreateHistoricalTab( 117 void BrowserTabStripModelDelegate::CreateHistoricalTab(
118 content::WebContents* contents) { 118 content::WebContents* contents) {
119 // We don't create historical tabs for incognito windows or windows without 119 // We don't create historical tabs for incognito windows or windows without
120 // profiles. 120 // profiles.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 //////////////////////////////////////////////////////////////////////////////// 157 ////////////////////////////////////////////////////////////////////////////////
158 // BrowserTabStripModelDelegate, private: 158 // BrowserTabStripModelDelegate, private:
159 159
160 void BrowserTabStripModelDelegate::CloseFrame() { 160 void BrowserTabStripModelDelegate::CloseFrame() {
161 browser_->window()->Close(); 161 browser_->window()->Close();
162 } 162 }
163 163
164 } // namespace chrome 164 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/chrome_select_file_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698