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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager_android.h

Issue 1092193004: Use related_applications manifest fields when showing native app banners (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h" 9 #include "base/android/jni_weak_ref.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 29 matching lines...) Expand all
40 40
41 // Called when the Java-side has retrieved information for the app. 41 // Called when the Java-side has retrieved information for the app.
42 // Returns |false| if an icon fetch couldn't be kicked off. 42 // Returns |false| if an icon fetch couldn't be kicked off.
43 bool OnAppDetailsRetrieved(JNIEnv* env, 43 bool OnAppDetailsRetrieved(JNIEnv* env,
44 jobject obj, 44 jobject obj,
45 jobject japp_data, 45 jobject japp_data,
46 jstring japp_title, 46 jstring japp_title,
47 jstring japp_package, 47 jstring japp_package,
48 jstring jicon_url); 48 jstring jicon_url);
49 49
50 // WebContentsObserver overrides.
51 bool OnMessageReceived(const IPC::Message& message) override;
52
53 // AppBannerDataFetcher::Delegate overrides.
54 bool OnInvalidManifest(AppBannerDataFetcher* fetcher) override;
55
56 protected: 50 protected:
57 AppBannerDataFetcher* CreateAppBannerDataFetcher( 51 AppBannerDataFetcher* CreateAppBannerDataFetcher(
58 base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate, 52 base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate,
59 const int ideal_icon_size) override; 53 const int ideal_icon_size) override;
60 54
61 private: 55 private:
62 // Called when the renderer has returned information about the meta tag. 56 // AppBannerDataFetcher::Delegate overrides.
63 // If there is some metadata for the play store tag, this kicks off the 57 bool HandleNonWebApp(const std::string& platform,
64 // process of showing a banner for the package designated by |tag_content| on 58 const GURL& url,
65 // the page at the |expected_url|. 59 const std::string& id) override;
66 void OnDidRetrieveMetaTagContent(bool success,
67 const std::string& tag_name,
68 const std::string& tag_content,
69 const GURL& expected_url);
70 60
71 // AppBannerManager on the Java side. 61 // AppBannerManager on the Java side.
72 JavaObjectWeakGlobalRef weak_java_banner_view_manager_; 62 JavaObjectWeakGlobalRef weak_java_banner_view_manager_;
73 63
74 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); 64 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid);
75 }; // class AppBannerManagerAndroid 65 }; // class AppBannerManagerAndroid
76 66
77 } // namespace banners 67 } // namespace banners
78 68
79 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ 69 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698