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

Unified Diff: chrome/renderer/external_extension.cc

Issue 2072613003: Convert GetSearchProviderInstallState to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move InstallState enum into mojom 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/external_extension.cc
diff --git a/chrome/renderer/external_extension.cc b/chrome/renderer/external_extension.cc
index ff616dca7353cc6e378d0010cc77f9a914699f98..87bb52d1cef082fdbf1d8fa6f066c418ced79454 100644
--- a/chrome/renderer/external_extension.cc
+++ b/chrome/renderer/external_extension.cc
@@ -9,7 +9,11 @@
#include "base/macros.h"
#include "chrome/common/render_messages.h"
Sam McNally 2016/06/23 03:05:35 Remove.
tibell 2016/06/23 03:44:39 Done.
#include "chrome/common/search_provider.h"
Sam McNally 2016/06/23 03:05:36 Remove.
tibell 2016/06/23 03:44:39 Done.
+#include "chrome/common/search_provider.mojom.h"
+#include "content/public/common/service_registry.h"
Sam McNally 2016/06/23 03:05:35 Remove.
tibell 2016/06/23 03:44:39 Done.
+#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
Sam McNally 2016/06/23 03:05:36 Remove.
tibell 2016/06/23 03:44:39 Done.
+#include "services/shell/public/cpp/interface_provider.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
Sam McNally 2016/06/23 03:05:36 Remove.
tibell 2016/06/23 03:44:39 Done.
@@ -107,16 +111,20 @@ void ExternalExtensionWrapper::IsSearchProviderInstalled(
if (!webframe)
return;
- search_provider::InstallState install = search_provider::DENIED;
+ chrome::mojom::InstallState install = chrome::mojom::InstallState::DENIED;
GURL inquiry_url = GURL(webframe->document().url()).Resolve(name);
if (!inquiry_url.is_empty()) {
webframe->didCallIsSearchProviderInstalled();
- render_view->Send(new ChromeViewHostMsg_GetSearchProviderInstallState(
- render_view->GetRoutingID(), webframe->document().url(), inquiry_url,
- &install));
+ chrome::mojom::SearchProviderInstallStatePtr search_provider_service;
+ content::RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
+ mojo::GetProxy(&search_provider_service));
+ if (!search_provider_service->GetInstallState(webframe->document().url(),
+ inquiry_url, &install)) {
+ DLOG(ERROR) << "Can't fetch search provider install state";
+ }
}
- if (install == search_provider::DENIED) {
+ if (install == chrome::mojom::InstallState::DENIED) {
// FIXME: throw access denied exception.
v8::Isolate* isolate = args.GetIsolate();
isolate->ThrowException(v8::Exception::Error(v8::String::Empty(isolate)));
« chrome/browser/search_engines/search_provider_install_state_impl.cc ('K') | « chrome/renderer/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698