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

Side by Side Diff: chrome/browser/extensions/extensions_ui.cc

Issue 42435: Implement default css for toolstrips. (Closed)
Patch Set: Fix crash Created 11 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 (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include "base/thread.h" 7 #include "base/thread.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/extensions/extensions_service.h" 9 #include "chrome/browser/extensions/extensions_service.h"
10 #include "chrome/browser/extensions/extension_error_reporter.h" 10 #include "chrome/browser/extensions/extension_error_reporter.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path, 31 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
32 int request_id) { 32 int request_id) {
33 DictionaryValue localized_strings; 33 DictionaryValue localized_strings;
34 localized_strings.SetString(L"title", 34 localized_strings.SetString(L"title",
35 l10n_util::GetString(IDS_EXTENSIONS_TITLE)); 35 l10n_util::GetString(IDS_EXTENSIONS_TITLE));
36 36
37 static const StringPiece extensions_html( 37 static const StringPiece extensions_html(
38 ResourceBundle::GetSharedInstance().GetRawDataResource( 38 ResourceBundle::GetSharedInstance().GetRawDataResource(
39 IDR_EXTENSIONS_HTML)); 39 IDR_EXTENSIONS_UI_HTML));
40 const std::string full_html = jstemplate_builder::GetTemplateHtml( 40 const std::string full_html = jstemplate_builder::GetTemplateHtml(
41 extensions_html, &localized_strings, "root"); 41 extensions_html, &localized_strings, "root");
42 42
43 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 43 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
44 html_bytes->data.resize(full_html.size()); 44 html_bytes->data.resize(full_html.size());
45 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin()); 45 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
46 46
47 SendResponse(request_id, html_bytes); 47 SendResponse(request_id, html_bytes);
48 } 48 }
49 49
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 AddMessageHandler(handler); 167 AddMessageHandler(handler);
168 handler->Init(); 168 handler->Init();
169 169
170 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); 170 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource();
171 171
172 // Set up the chrome-ui://extensions/ source. 172 // Set up the chrome-ui://extensions/ source.
173 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 173 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
174 NewRunnableMethod(&chrome_url_data_manager, 174 NewRunnableMethod(&chrome_url_data_manager,
175 &ChromeURLDataManager::AddDataSource, html_source)); 175 &ChromeURLDataManager::AddDataSource, html_source));
176 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698