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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_theme_source.cc

Issue 6263008: Move ResourceBundle, DataPack to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/dom_ui_theme_source.h" 5 #include "chrome/browser/dom_ui/dom_ui_theme_source.h"
6 6
7 #include "app/resource_bundle.h"
8 #include "base/message_loop.h" 7 #include "base/message_loop.h"
9 #include "base/ref_counted_memory.h" 8 #include "base/ref_counted_memory.h"
10 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
11 #include "chrome/browser/dom_ui/ntp_resource_cache.h" 10 #include "chrome/browser/dom_ui/ntp_resource_cache.h"
12 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/resources_util.h" 12 #include "chrome/browser/resources_util.h"
14 #include "chrome/browser/themes/browser_theme_provider.h" 13 #include "chrome/browser/themes/browser_theme_provider.h"
15 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
16 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/theme_provider.h" 17 #include "ui/base/theme_provider.h"
18 18
19 // use a resource map rather than hard-coded strings. 19 // use a resource map rather than hard-coded strings.
20 static const char* kNewTabCSSPath = "css/newtab.css"; 20 static const char* kNewTabCSSPath = "css/newtab.css";
21 static const char* kNewIncognitoTabCSSPath = "css/newincognitotab.css"; 21 static const char* kNewIncognitoTabCSSPath = "css/newincognitotab.css";
22 22
23 static std::string StripQueryParams(const std::string& path) { 23 static std::string StripQueryParams(const std::string& path) {
24 GURL path_url = GURL(std::string(chrome::kChromeUIScheme) + "://" + 24 GURL path_url = GURL(std::string(chrome::kChromeUIScheme) + "://" +
25 std::string(chrome::kChromeUIThemePath) + "/" + path); 25 std::string(chrome::kChromeUIThemePath) + "/" + path);
26 return path_url.path().substr(1); // path() always includes a leading '/'. 26 return path_url.path().substr(1); // path() always includes a leading '/'.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 DCHECK(tp); 104 DCHECK(tp);
105 105
106 scoped_refptr<RefCountedMemory> image_data(tp->GetRawData(resource_id)); 106 scoped_refptr<RefCountedMemory> image_data(tp->GetRawData(resource_id));
107 SendResponse(request_id, image_data); 107 SendResponse(request_id, image_data);
108 } else { 108 } else {
109 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 109 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
110 const ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 110 const ResourceBundle& rb = ResourceBundle::GetSharedInstance();
111 SendResponse(request_id, rb.LoadDataResourceBytes(resource_id)); 111 SendResponse(request_id, rb.LoadDataResourceBytes(resource_id));
112 } 112 }
113 } 113 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_favicon_source.cc ('k') | chrome/browser/dom_ui/dom_ui_thumbnail_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698