summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_to_mobile_service.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 03:03:39 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 03:03:39 +0000
commit7e8a3ffaed19ac3c6c187464abc22558bf78a556 (patch)
treec6feb5d59cb922174ea80845ab177f5c58c04dda /chrome/browser/chrome_to_mobile_service.h
parentd32b146d6e7eb70a4540f7be7ac6aa9ede32dbe1 (diff)
downloadchromium_src-7e8a3ffaed19ac3c6c187464abc22558bf78a556.zip
chromium_src-7e8a3ffaed19ac3c6c187464abc22558bf78a556.tar.gz
chromium_src-7e8a3ffaed19ac3c6c187464abc22558bf78a556.tar.bz2
Get rid of browser::FindLastActiveWithProfile call in a send to mobile code. I plumbed through Browser* for the two commands. For command-enabling after the query, I updated all open browsers which seems like the desired behavior.
BUG=129187 Review URL: https://chromiumcodereview.appspot.com/10698026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_to_mobile_service.h')
-rw-r--r--chrome/browser/chrome_to_mobile_service.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h
index 3ca631b..96976ef 100644
--- a/chrome/browser/chrome_to_mobile_service.h
+++ b/chrome/browser/chrome_to_mobile_service.h
@@ -17,6 +17,7 @@
#include "base/string16.h"
#include "base/timer.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
+#include "chrome/browser/sessions/session_id.h"
#include "chrome/common/net/gaia/oauth2_access_token_consumer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -24,6 +25,7 @@
#include "net/url_request/url_fetcher_delegate.h"
class OAuth2AccessTokenFetcher;
+class Browser;
class CloudPrintURL;
class MockChromeToMobileService;
class Profile;
@@ -105,14 +107,16 @@ class ChromeToMobileService : public ProfileKeyedService,
// Virtual for unit test mocking.
virtual void RequestMobileListUpdate();
- // Callback with an MHTML snapshot of the profile's selected WebContents.
+ // Callback with an MHTML snapshot of the browser's selected WebContents.
// Virtual for unit test mocking.
- virtual void GenerateSnapshot(base::WeakPtr<Observer> observer);
+ virtual void GenerateSnapshot(Browser* browser,
+ base::WeakPtr<Observer> observer);
- // Send the profile's selected WebContents to the specified mobile device.
+ // Send the browser's selected WebContents to the specified mobile device.
// Virtual for unit test mocking.
virtual void SendToMobile(const string16& mobile_id,
const FilePath& snapshot,
+ Browser* browser,
base::WeakPtr<Observer> observer);
// Delete the snapshot file (should be called on observer destruction).
@@ -141,6 +145,7 @@ class ChromeToMobileService : public ProfileKeyedService,
// Handle the attempted creation of a temporary file for snapshot generation.
// Alert the observer of failure or generate MHTML with an observer callback.
void SnapshotFileCreated(base::WeakPtr<Observer> observer,
+ SessionID::id_type browser_id,
const FilePath& path,
bool success);