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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/browser.py

Issue 10914237: Port perf.py's _LoginToGoogleAccount to chrome_remote_control (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: tools/chrome_remote_control/chrome_remote_control/browser.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/browser.py b/tools/chrome_remote_control/chrome_remote_control/browser.py
index e90bf9eaf8ce39e060d0157e29f937751684b09f..5390a6ef38b8947b2298dc242bec7a6addaabf76 100644
--- a/tools/chrome_remote_control/chrome_remote_control/browser.py
+++ b/tools/chrome_remote_control/chrome_remote_control/browser.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from chrome_remote_control import temporary_http_server
+from chrome_remote_control import browser_credentials
class Browser(object):
"""A running browser instance that can be controlled in a limited way.
@@ -16,6 +17,7 @@ class Browser(object):
"""
def __init__(self, backend):
self._backend = backend
+ self.credentials = browser_credentials.BrowserCredentials()
def __enter__(self):
return self
@@ -40,6 +42,13 @@ class Browser(object):
def Close(self):
self._backend.Close()
+ self.credentials = None
def CreateTemporaryHTTPServer(self, path):
return temporary_http_server.TemporaryHTTPServer(self._backend, path)
+
+ def LoginNeeded(self, credentials_type, tab):
+ self.credentials.LoginNeeded(credentials_type, tab)
+
+ def LoginNoLongerNeeded(self, credentials_type, tab):
+ self.credentials.LoginNoLongerNeeded(credentials_type, tab)

Powered by Google App Engine
This is Rietveld 408576698