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

Unified Diff: chrome/renderer/chrome_render_frame_observer.cc

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Add TODO Created 4 years, 2 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
« no previous file with comments | « chrome/renderer/chrome_render_frame_observer.h ('k') | components/test_runner/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_frame_observer.cc
diff --git a/chrome/renderer/chrome_render_frame_observer.cc b/chrome/renderer/chrome_render_frame_observer.cc
index 977faf83e927caa2d683a55984e439d3115329fa..d5ec33a9c0dc4bb302123e3135ed6c2a5ccb068d 100644
--- a/chrome/renderer/chrome_render_frame_observer.cc
+++ b/chrome/renderer/chrome_render_frame_observer.cc
@@ -30,7 +30,6 @@
#include "skia/ext/image_operations.h"
#include "third_party/WebKit/public/platform/WebImage.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerPromptReply.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -149,8 +148,6 @@ bool ChromeRenderFrameObserver::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintNodeUnderContextMenu,
OnPrintNodeUnderContextMenu)
#endif
- IPC_MESSAGE_HANDLER(ChromeViewMsg_AppBannerPromptRequest,
- OnAppBannerPromptRequest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -240,30 +237,6 @@ void ChromeRenderFrameObserver::OnSetClientSidePhishingDetection(
#endif
}
-void ChromeRenderFrameObserver::OnAppBannerPromptRequest(
- int request_id,
- const std::string& platform) {
- // App banner prompt requests are handled in the general chrome render frame
- // observer, not the AppBannerClient, as the AppBannerClient is created lazily
- // by blink and may not exist when the request is sent.
- blink::WebAppBannerPromptReply reply = blink::WebAppBannerPromptReply::None;
- blink::WebString web_platform(base::UTF8ToUTF16(platform));
- blink::WebVector<blink::WebString> web_platforms(&web_platform, 1);
-
- blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
- frame->willShowInstallBannerPrompt(request_id, web_platforms, &reply);
-
- // Extract the referrer header for this site according to its referrer policy.
- // Pass in an empty URL as the destination so that it is always treated
- // as a cross-origin request.
- std::string referrer = blink::WebSecurityPolicy::generateReferrerHeader(
- frame->document().referrerPolicy(), GURL(),
- frame->document().outgoingReferrer()).utf8();
-
- Send(new ChromeViewHostMsg_AppBannerPromptReply(
- routing_id(), request_id, reply, referrer));
-}
-
void ChromeRenderFrameObserver::DidFinishLoad() {
WebLocalFrame* frame = render_frame()->GetWebFrame();
// Don't do anything for subframes.
« no previous file with comments | « chrome/renderer/chrome_render_frame_observer.h ('k') | components/test_runner/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698