diff options
author | kristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 14:58:58 +0000 |
---|---|---|
committer | kristianm@chromium.org <kristianm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 14:58:58 +0000 |
commit | 3a879683c4422affac21bb8cb4cfb7b3004730f0 (patch) | |
tree | b77bfbdff457644164de7df117f91635b8e09b82 /android_webview/browser | |
parent | c37a3c686abacfe30528c3cdf65d772220392f56 (diff) | |
download | chromium_src-3a879683c4422affac21bb8cb4cfb7b3004730f0.zip chromium_src-3a879683c4422affac21bb8cb4cfb7b3004730f0.tar.gz chromium_src-3a879683c4422affac21bb8cb4cfb7b3004730f0.tar.bz2 |
Implementing geolocation for the Android Webview
Enabling geolocation callbacks
BUG=
Review URL: https://chromiumcodereview.appspot.com/12211047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser')
-rw-r--r-- | android_webview/browser/aw_content_browser_client.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index 4662e74..bc4918b 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -24,20 +24,25 @@ namespace { -class DummyAccessTokenStore : public content::AccessTokenStore { +class AwAccessTokenStore : public content::AccessTokenStore { public: - DummyAccessTokenStore() { } + AwAccessTokenStore() { } + // content::AccessTokenStore implementation virtual void LoadAccessTokens( - const LoadAccessTokensCallbackType& request) OVERRIDE { } + const LoadAccessTokensCallbackType& request) OVERRIDE { + AccessTokenStore::AccessTokenSet access_token_set; + // AccessTokenSet and net::URLRequestContextGetter not used on Android, + // but Run needs to be called to finish the geolocation setup. + request.Run(access_token_set, NULL); + } + virtual void SaveAccessToken(const GURL& server_url, + const string16& access_token) OVERRIDE { } private: - virtual ~DummyAccessTokenStore() { } - - virtual void SaveAccessToken( - const GURL& server_url, const string16& access_token) OVERRIDE { } + virtual ~AwAccessTokenStore() { } - DISALLOW_COPY_AND_ASSIGN(DummyAccessTokenStore); + DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore); }; } @@ -326,8 +331,7 @@ net::NetLog* AwContentBrowserClient::GetNetLog() { } content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() { - // TODO(boliu): Implement as part of geolocation code. - return new DummyAccessTokenStore(); + return new AwAccessTokenStore(); } bool AwContentBrowserClient::IsFastShutdownPossible() { |