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/options/options_ui.cc

Issue 4655002: Don't show tabbed options page in OTR browser window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcheck instead Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_strip_gtk.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) 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/options/options_ui.h" 5 #include "chrome/browser/dom_ui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 DOMUI::RenderViewCreated(render_view_host); 233 DOMUI::RenderViewCreated(render_view_host);
234 } 234 }
235 235
236 // static 236 // static
237 RefCountedMemory* OptionsUI::GetFaviconResourceBytes() { 237 RefCountedMemory* OptionsUI::GetFaviconResourceBytes() {
238 return ResourceBundle::GetSharedInstance(). 238 return ResourceBundle::GetSharedInstance().
239 LoadDataResourceBytes(IDR_SETTINGS_FAVICON); 239 LoadDataResourceBytes(IDR_SETTINGS_FAVICON);
240 } 240 }
241 241
242 void OptionsUI::InitializeHandlers() { 242 void OptionsUI::InitializeHandlers() {
243 DCHECK(!GetProfile()->IsOffTheRecord());
244
243 std::vector<DOMMessageHandler*>::iterator iter; 245 std::vector<DOMMessageHandler*>::iterator iter;
244 for (iter = handlers_.begin(); iter != handlers_.end(); ++iter) { 246 for (iter = handlers_.begin(); iter != handlers_.end(); ++iter) {
245 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); 247 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize();
246 } 248 }
247 } 249 }
248 250
249 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, 251 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
250 OptionsPageUIHandler* handler_raw) { 252 OptionsPageUIHandler* handler_raw) {
251 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); 253 scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
252 DCHECK(handler.get()); 254 DCHECK(handler.get());
253 // Add only if handler's service is enabled. 255 // Add only if handler's service is enabled.
254 if (handler->IsEnabled()) { 256 if (handler->IsEnabled()) {
255 handler->GetLocalizedValues(localized_strings); 257 handler->GetLocalizedValues(localized_strings);
256 // Add handler to the list and also pass the ownership. 258 // Add handler to the list and also pass the ownership.
257 AddMessageHandler(handler.release()->Attach(this)); 259 AddMessageHandler(handler.release()->Attach(this));
258 } 260 }
259 } 261 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698