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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 2000063004: MD Settings: fix favicon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.h ('k') | chrome/browser/ui/webui/settings_utils.h » ('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) 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/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 continue; 412 continue;
413 } 413 }
414 base::DictionaryValue* entry = new base::DictionaryValue(); 414 base::DictionaryValue* entry = new base::DictionaryValue();
415 entry->SetString("title", match.description); 415 entry->SetString("title", match.description);
416 entry->SetString("displayURL", match.contents); 416 entry->SetString("displayURL", match.contents);
417 entry->SetString("url", match.destination_url.spec()); 417 entry->SetString("url", match.destination_url.spec());
418 suggestions->Append(entry); 418 suggestions->Append(entry);
419 } 419 }
420 } 420 }
421 421
422 // static
423 base::RefCountedMemory* OptionsUI::GetFaviconResourceBytes(
424 ui::ScaleFactor scale_factor) {
425 return ui::ResourceBundle::GetSharedInstance().
426 LoadDataResourceBytesForScale(IDR_SETTINGS_FAVICON, scale_factor);
427 }
428
429 void OptionsUI::DidStartProvisionalLoadForFrame( 422 void OptionsUI::DidStartProvisionalLoadForFrame(
430 content::RenderFrameHost* render_frame_host, 423 content::RenderFrameHost* render_frame_host,
431 const GURL& validated_url, 424 const GURL& validated_url,
432 bool is_error_page, 425 bool is_error_page,
433 bool is_iframe_srcdoc) { 426 bool is_iframe_srcdoc) {
434 load_start_time_ = base::Time::Now(); 427 load_start_time_ = base::Time::Now();
435 if (render_frame_host->GetRenderViewHost() == 428 if (render_frame_host->GetRenderViewHost() ==
436 web_ui()->GetWebContents()->GetRenderViewHost() && 429 web_ui()->GetWebContents()->GetRenderViewHost() &&
437 validated_url.host() == chrome::kChromeUISettingsFrameHost) { 430 validated_url.host() == chrome::kChromeUISettingsFrameHost) {
438 for (size_t i = 0; i < handlers_.size(); ++i) 431 for (size_t i = 0; i < handlers_.size(); ++i)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // Add only if handler's service is enabled. 485 // Add only if handler's service is enabled.
493 if (handler->IsEnabled()) { 486 if (handler->IsEnabled()) {
494 // Add handler to the list and also pass the ownership. 487 // Add handler to the list and also pass the ownership.
495 web_ui()->AddMessageHandler(handler.release()); 488 web_ui()->AddMessageHandler(handler.release());
496 handler_raw->GetLocalizedValues(localized_strings); 489 handler_raw->GetLocalizedValues(localized_strings);
497 handlers_.push_back(handler_raw); 490 handlers_.push_back(handler_raw);
498 } 491 }
499 } 492 }
500 493
501 } // namespace options 494 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.h ('k') | chrome/browser/ui/webui/settings_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698