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

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

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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/home_page_overlay_handler.h" 5 #include "chrome/browser/ui/webui/options/home_page_overlay_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 autocomplete_controller_->Start(AutocompleteInput( 57 autocomplete_controller_->Start(AutocompleteInput(
58 input, base::string16::npos, std::string(), GURL(), 58 input, base::string16::npos, std::string(), GURL(),
59 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false, 59 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false,
60 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui())))); 60 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui()))));
61 } 61 }
62 62
63 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) { 63 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) {
64 const AutocompleteResult& result = autocomplete_controller_->result(); 64 const AutocompleteResult& result = autocomplete_controller_->result();
65 base::ListValue suggestions; 65 base::ListValue suggestions;
66 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 66 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
67 web_ui()->CallJavascriptFunction( 67 web_ui()->CallJavascriptFunctionUnsafe(
68 "HomePageOverlay.updateAutocompleteSuggestions", suggestions); 68 "HomePageOverlay.updateAutocompleteSuggestions", suggestions);
69 } 69 }
70 70
71 } // namespace options 71 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/handler_options_handler.cc ('k') | chrome/browser/ui/webui/options/import_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698