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

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

Issue 1440113002: [MD] Change appearance of incognito NTP to MD spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: guest Created 5 years, 1 month 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) 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/webui/theme_source.h" 5 #include "chrome/browser/ui/webui/theme_source.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 scale_factor, data); 61 scale_factor, data);
62 } 62 }
63 63
64 } // namespace 64 } // namespace
65 65
66 //////////////////////////////////////////////////////////////////////////////// 66 ////////////////////////////////////////////////////////////////////////////////
67 // ThemeSource, public: 67 // ThemeSource, public:
68 68
69 ThemeSource::ThemeSource(Profile* profile) 69 ThemeSource::ThemeSource(Profile* profile)
70 : profile_(profile->GetOriginalProfile()) { 70 : profile_(profile->GetOriginalProfile()) {
71 // NB: it's important that this is |profile| and not |profile_|.
Dan Beam 2015/11/13 01:32:22 random question: is it too weird to just initializ
Dan Beam 2015/11/13 01:33:23 well : profile_(nullptr) ... profile_ = p
Evan Stade 2015/11/13 01:39:00 I guess that would be one way to make this more bu
Dan Beam 2015/11/16 19:57:25 ok
71 NTPResourceCache::WindowType win_type = NTPResourceCache::GetWindowType( 72 NTPResourceCache::WindowType win_type = NTPResourceCache::GetWindowType(
72 profile_, NULL); 73 profile, NULL);
73 css_bytes_ = 74 css_bytes_ =
74 NTPResourceCacheFactory::GetForProfile(profile)->GetNewTabCSS(win_type); 75 NTPResourceCacheFactory::GetForProfile(profile)->GetNewTabCSS(win_type);
75 } 76 }
76 77
77 ThemeSource::~ThemeSource() { 78 ThemeSource::~ThemeSource() {
78 } 79 }
79 80
80 std::string ThemeSource::GetSource() const { 81 std::string ThemeSource::GetSource() const {
81 return chrome::kChromeUIThemePath; 82 return chrome::kChromeUIThemePath;
82 } 83 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } else { 249 } else {
249 DCHECK_CURRENTLY_ON(BrowserThread::IO); 250 DCHECK_CURRENTLY_ON(BrowserThread::IO);
250 // Fetching image data in ResourceBundle should happen on the UI thread. See 251 // Fetching image data in ResourceBundle should happen on the UI thread. See
251 // crbug.com/449277 252 // crbug.com/449277
252 content::BrowserThread::PostTaskAndReply( 253 content::BrowserThread::PostTaskAndReply(
253 content::BrowserThread::UI, FROM_HERE, 254 content::BrowserThread::UI, FROM_HERE,
254 base::Bind(&ProcessResourceOnUIThread, resource_id, scale_factor, data), 255 base::Bind(&ProcessResourceOnUIThread, resource_id, scale_factor, data),
255 base::Bind(callback, data)); 256 base::Bind(callback, data));
256 } 257 }
257 } 258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698