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

Side by Side Diff: chrome/browser/ui/webui/flash_ui.cc

Issue 8113018: [web-ui] Migrate RegisterMessageCallback usage to base::bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/browser/ui/webui/flags_ui.cc ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/flash_ui.h" 5 #include "chrome/browser/ui/webui/flash_ui.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h"
12 #include "base/bind_helpers.h"
13 #include "base/callback_old.h"
11 #include "base/i18n/time_formatting.h" 14 #include "base/i18n/time_formatting.h"
12 #include "base/string_number_conversions.h" 15 #include "base/string_number_conversions.h"
13 #include "base/stringprintf.h" 16 #include "base/stringprintf.h"
14 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
15 #include "base/timer.h" 18 #include "base/timer.h"
16 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
17 #include "base/values.h" 20 #include "base/values.h"
18 #include "chrome/browser/crash_upload_list.h" 21 #include "chrome/browser/crash_upload_list.h"
19 #include "chrome/browser/plugin_prefs.h" 22 #include "chrome/browser/plugin_prefs.h"
20 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 OnGpuInfoUpdate(); 138 OnGpuInfoUpdate();
136 139
137 // And lastly, we fire off a timer to make sure we never get stuck at the 140 // And lastly, we fire off a timer to make sure we never get stuck at the
138 // "Loading..." message. 141 // "Loading..." message.
139 timeout_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kTimeout), 142 timeout_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kTimeout),
140 this, &FlashDOMHandler::OnTimeout); 143 this, &FlashDOMHandler::OnTimeout);
141 } 144 }
142 145
143 void FlashDOMHandler::RegisterMessages() { 146 void FlashDOMHandler::RegisterMessages() {
144 web_ui_->RegisterMessageCallback("requestFlashInfo", 147 web_ui_->RegisterMessageCallback("requestFlashInfo",
145 NewCallback(this, &FlashDOMHandler::HandleRequestFlashInfo)); 148 base::Bind(&FlashDOMHandler::HandleRequestFlashInfo,
149 base::Unretained(this)));
146 } 150 }
147 151
148 void FlashDOMHandler::OnCrashListAvailable() { 152 void FlashDOMHandler::OnCrashListAvailable() {
149 crash_list_available_ = true; 153 crash_list_available_ = true;
150 MaybeRespondToPage(); 154 MaybeRespondToPage();
151 } 155 }
152 156
153 void AddPair(ListValue* list, const string16& key, const string16& value) { 157 void AddPair(ListValue* list, const string16& key, const string16& value) {
154 DictionaryValue* results = new DictionaryValue(); 158 DictionaryValue* results = new DictionaryValue();
155 results->SetString("key", key); 159 results->SetString("key", key);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // Set up the about:flash source. 345 // Set up the about:flash source.
342 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); 346 Profile* profile = Profile::FromBrowserContext(contents->browser_context());
343 profile->GetChromeURLDataManager()->AddDataSource(CreateFlashUIHTMLSource()); 347 profile->GetChromeURLDataManager()->AddDataSource(CreateFlashUIHTMLSource());
344 } 348 }
345 349
346 // static 350 // static
347 RefCountedMemory* FlashUI::GetFaviconResourceBytes() { 351 RefCountedMemory* FlashUI::GetFaviconResourceBytes() {
348 // Use the default icon for now. 352 // Use the default icon for now.
349 return NULL; 353 return NULL;
350 } 354 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/flags_ui.cc ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698