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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 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/browser/android/webapps/add_to_homescreen_data_fetcher.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
index 064d1bf8c7391fe2ab498df38d8111a0470949a1..41f846b3dd459183c4c582764fe1ee6fedb68d9a 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -26,6 +26,7 @@
#include "components/favicon_base/favicon_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/manifest_icon_selector.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/manifest.h"
@@ -97,7 +98,9 @@ AddToHomescreenDataFetcher::AddToHomescreenDataFetcher(
DCHECK(minimum_splash_image_size_in_px <= ideal_splash_image_size_in_px);
// Send a message to the renderer to retrieve information about the page.
- Send(new ChromeViewMsg_GetWebApplicationInfo(routing_id()));
+ content::RenderFrameHost* main_frame = web_contents->GetMainFrame();
+ main_frame->Send(
+ new ChromeFrameMsg_GetWebApplicationInfo(main_frame->GetRoutingID()));
}
void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
@@ -166,14 +169,15 @@ AddToHomescreenDataFetcher::~AddToHomescreenDataFetcher() {
}
bool AddToHomescreenDataFetcher::OnMessageReceived(
- const IPC::Message& message) {
+ const IPC::Message& message,
+ content::RenderFrameHost* sender) {
if (!is_waiting_for_web_application_info_)
return false;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AddToHomescreenDataFetcher, message)
- IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidGetWebApplicationInfo,
+ IPC_MESSAGE_HANDLER(ChromeFrameHostMsg_DidGetWebApplicationInfo,
OnDidGetWebApplicationInfo)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()

Powered by Google App Engine
This is Rietveld 408576698