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: chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc

Issue 9114020: Remove task.h and finish base::Bind() migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/webui/chromeos/imageburner/imageburner_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 WebUIHandlerTaskProxy::WebUIHandlerTaskProxy(Delegate* delegate) { 113 WebUIHandlerTaskProxy::WebUIHandlerTaskProxy(Delegate* delegate) {
114 delegate_ = delegate->AsWeakPtr(); 114 delegate_ = delegate->AsWeakPtr();
115 delegate_->DetachFromThread(); 115 delegate_->DetachFromThread();
116 } 116 }
117 117
118 WebUIHandlerTaskProxy::~WebUIHandlerTaskProxy() { 118 WebUIHandlerTaskProxy::~WebUIHandlerTaskProxy() {
119 } 119 }
120 120
121 void WebUIHandlerTaskProxy::DeleteOnUIThread() { 121 void WebUIHandlerTaskProxy::DeleteOnUIThread() {
122 BrowserThread::PostTask( 122 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
123 BrowserThread::UI, FROM_HERE, 123 base::Bind(&base::DoNothing));
124 base::Bind(&WebUIHandlerTaskProxy::DoNothing, this));
125 } 124 }
126 125
127 //////////////////////////////////////////////////////////////////////////////// 126 ////////////////////////////////////////////////////////////////////////////////
128 // 127 //
129 // WebUIHandler 128 // WebUIHandler
130 // 129 //
131 //////////////////////////////////////////////////////////////////////////////// 130 ////////////////////////////////////////////////////////////////////////////////
132 131
133 WebUIHandler::WebUIHandler(WebContents* contents) 132 WebUIHandler::WebUIHandler(WebContents* contents)
134 : web_contents_(contents), 133 : web_contents_(contents),
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 //////////////////////////////////////////////////////////////////////////////// 646 ////////////////////////////////////////////////////////////////////////////////
648 647
649 ImageBurnUI::ImageBurnUI(WebContents* contents) : ChromeWebUI(contents) { 648 ImageBurnUI::ImageBurnUI(WebContents* contents) : ChromeWebUI(contents) {
650 imageburner::WebUIHandler* handler = new imageburner::WebUIHandler(contents); 649 imageburner::WebUIHandler* handler = new imageburner::WebUIHandler(contents);
651 AddMessageHandler(handler); 650 AddMessageHandler(handler);
652 651
653 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 652 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
654 profile->GetChromeURLDataManager()->AddDataSource( 653 profile->GetChromeURLDataManager()->AddDataSource(
655 CreateImageburnerUIHTMLSource()); 654 CreateImageburnerUIHTMLSource());
656 } 655 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698