Commit 05bae669 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Make order of functions in .cc file matches those in .h file for add_to_homescreen_data_fetcher.*

BUG=None

Review-Url: https://codereview.chromium.org/2347053002
Cr-Commit-Position: refs/heads/master@{#419221}
parent 8baafc72
......@@ -96,6 +96,13 @@ AddToHomescreenDataFetcher::AddToHomescreenDataFetcher(
Send(new ChromeViewMsg_GetWebApplicationInfo(routing_id()));
}
base::Closure AddToHomescreenDataFetcher::FetchSplashScreenImageCallback(
const std::string& webapp_id) {
return base::Bind(&ShortcutHelper::FetchSplashScreenImage, web_contents(),
splash_screen_url_, ideal_splash_image_size_in_dp_,
minimum_splash_image_size_in_dp_, webapp_id);
}
void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
const WebApplicationInfo& received_web_app_info) {
is_waiting_for_web_application_info_ = false;
......@@ -157,6 +164,27 @@ void AddToHomescreenDataFetcher::OnDidGetWebApplicationInfo(
this));
}
AddToHomescreenDataFetcher::~AddToHomescreenDataFetcher() {
DCHECK(!weak_observer_);
}
bool AddToHomescreenDataFetcher::OnMessageReceived(
const IPC::Message& message) {
if (!is_waiting_for_web_application_info_)
return false;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AddToHomescreenDataFetcher, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidGetWebApplicationInfo,
OnDidGetWebApplicationInfo)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
const InstallableData& data) {
if (!web_contents() || !weak_observer_)
......@@ -199,33 +227,6 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
FetchFavicon();
}
bool AddToHomescreenDataFetcher::OnMessageReceived(
const IPC::Message& message) {
if (!is_waiting_for_web_application_info_)
return false;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AddToHomescreenDataFetcher, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidGetWebApplicationInfo,
OnDidGetWebApplicationInfo)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
AddToHomescreenDataFetcher::~AddToHomescreenDataFetcher() {
DCHECK(!weak_observer_);
}
base::Closure AddToHomescreenDataFetcher::FetchSplashScreenImageCallback(
const std::string& webapp_id) {
return base::Bind(&ShortcutHelper::FetchSplashScreenImage, web_contents(),
splash_screen_url_, ideal_splash_image_size_in_dp_,
minimum_splash_image_size_in_dp_, webapp_id);
}
void AddToHomescreenDataFetcher::FetchFavicon() {
if (!web_contents() || !weak_observer_)
return;
......
......@@ -89,14 +89,17 @@ class AddToHomescreenDataFetcher
ShortcutInfo& shortcut_info() { return shortcut_info_; }
const SkBitmap& shortcut_icon() const { return shortcut_icon_; }
// WebContentsObserver
bool OnMessageReceived(const IPC::Message& message) override;
private:
friend class base::RefCounted<AddToHomescreenDataFetcher>;
~AddToHomescreenDataFetcher() override;
// WebContentsObserver
bool OnMessageReceived(const IPC::Message& message) override;
// Called when InstallableManager finishes looking for a manifest and icon.
void OnDidPerformInstallableCheck(const InstallableData& data);
// Grabs the favicon for the current URL.
void FetchFavicon();
void OnFaviconFetched(
......@@ -108,9 +111,6 @@ class AddToHomescreenDataFetcher
void CreateLauncherIconFromFaviconInBackground(
const favicon_base::FaviconRawBitmapResult& bitmap_result);
// Called when InstallableManager finishes looking for a manifest and icon.
void OnDidPerformInstallableCheck(const InstallableData& data);
// Creates the launcher icon from the given |icon|.
void CreateLauncherIconInBackground(const SkBitmap& raw__icon);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment