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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 2823042: Implement IsSearchProviderInstalled and a test for it. (Closed)
Patch Set: Addressed feedback. Created 10 years, 5 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) 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/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 uint32 context = 0; 1574 uint32 context = 0;
1575 Send(new ViewHostMsg_GetCPBrowsingContext(&context)); 1575 Send(new ViewHostMsg_GetCPBrowsingContext(&context));
1576 return context; 1576 return context;
1577 } 1577 }
1578 1578
1579 void RenderView::AddSearchProvider(const std::string& url) { 1579 void RenderView::AddSearchProvider(const std::string& url) {
1580 AddGURLSearchProvider(GURL(url), 1580 AddGURLSearchProvider(GURL(url),
1581 false); // not autodetected 1581 false); // not autodetected
1582 } 1582 }
1583 1583
1584 ViewHostMsg_GetSearchProviderInstallState_Params
1585 RenderView::GetSearchProviderInstallState(const std::string& url) {
1586 GURL inquiry_url = GURL(url);
1587 if (inquiry_url.is_empty())
1588 return ViewHostMsg_GetSearchProviderInstallState_Params::Denied();
1589 ViewHostMsg_GetSearchProviderInstallState_Params install;
1590 Send(new ViewHostMsg_GetSearchProviderInstallState(routing_id_,
1591 inquiry_url,
1592 &install));
1593 return install;
1594 }
1595
1584 void RenderView::OnMissingPluginStatus( 1596 void RenderView::OnMissingPluginStatus(
1585 WebPluginDelegateProxy* delegate, 1597 WebPluginDelegateProxy* delegate,
1586 int status) { 1598 int status) {
1587 #if defined(OS_WIN) 1599 #if defined(OS_WIN)
1588 if (!first_default_plugin_) { 1600 if (!first_default_plugin_) {
1589 // Show the InfoBar for the first available plugin. 1601 // Show the InfoBar for the first available plugin.
1590 if (status == default_plugin::MISSING_PLUGIN_AVAILABLE) { 1602 if (status == default_plugin::MISSING_PLUGIN_AVAILABLE) {
1591 first_default_plugin_ = delegate->AsWeakPtr(); 1603 first_default_plugin_ = delegate->AsWeakPtr();
1592 Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status)); 1604 Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status));
1593 } 1605 }
(...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after
5305 webkit_glue::FormData form; 5317 webkit_glue::FormData form;
5306 const WebInputElement element = node.toConst<WebInputElement>(); 5318 const WebInputElement element = node.toConst<WebInputElement>();
5307 if (!form_manager_.FindFormWithFormControlElement( 5319 if (!form_manager_.FindFormWithFormControlElement(
5308 element, FormManager::REQUIRE_NONE, &form)) 5320 element, FormManager::REQUIRE_NONE, &form))
5309 return; 5321 return;
5310 5322
5311 autofill_action_ = action; 5323 autofill_action_ = action;
5312 Send(new ViewHostMsg_FillAutoFillFormData( 5324 Send(new ViewHostMsg_FillAutoFillFormData(
5313 routing_id_, autofill_query_id_, form, value, label)); 5325 routing_id_, autofill_query_id_, form, value, label));
5314 } 5326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698