OLD | NEW |
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 <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 entry->SetString("title", match.description); | 499 entry->SetString("title", match.description); |
500 entry->SetString("displayURL", match.contents); | 500 entry->SetString("displayURL", match.contents); |
501 entry->SetString("url", match.destination_url.spec()); | 501 entry->SetString("url", match.destination_url.spec()); |
502 suggestions->Append(std::move(entry)); | 502 suggestions->Append(std::move(entry)); |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
506 void OptionsUI::DidStartProvisionalLoadForFrame( | 506 void OptionsUI::DidStartProvisionalLoadForFrame( |
507 content::RenderFrameHost* render_frame_host, | 507 content::RenderFrameHost* render_frame_host, |
508 const GURL& validated_url, | 508 const GURL& validated_url, |
509 bool is_error_page, | 509 bool is_error_page) { |
510 bool is_iframe_srcdoc) { | |
511 load_start_time_ = base::Time::Now(); | 510 load_start_time_ = base::Time::Now(); |
512 if (render_frame_host->GetRenderViewHost() == | 511 if (render_frame_host->GetRenderViewHost() == |
513 web_ui()->GetWebContents()->GetRenderViewHost() && | 512 web_ui()->GetWebContents()->GetRenderViewHost() && |
514 validated_url.host_piece() == chrome::kChromeUISettingsFrameHost) { | 513 validated_url.host_piece() == chrome::kChromeUISettingsFrameHost) { |
515 for (size_t i = 0; i < handlers_.size(); ++i) | 514 for (size_t i = 0; i < handlers_.size(); ++i) |
516 handlers_[i]->PageLoadStarted(); | 515 handlers_[i]->PageLoadStarted(); |
517 } | 516 } |
518 } | 517 } |
519 | 518 |
520 void OptionsUI::DocumentLoadedInFrame( | 519 void OptionsUI::DocumentLoadedInFrame( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 // Add only if handler's service is enabled. | 568 // Add only if handler's service is enabled. |
570 if (handler->IsEnabled()) { | 569 if (handler->IsEnabled()) { |
571 // Add handler to the list and also pass the ownership. | 570 // Add handler to the list and also pass the ownership. |
572 web_ui()->AddMessageHandler(handler.release()); | 571 web_ui()->AddMessageHandler(handler.release()); |
573 handler_raw->GetLocalizedValues(localized_strings); | 572 handler_raw->GetLocalizedValues(localized_strings); |
574 handlers_.push_back(handler_raw); | 573 handlers_.push_back(handler_raw); |
575 } | 574 } |
576 } | 575 } |
577 | 576 |
578 } // namespace options | 577 } // namespace options |
OLD | NEW |