summaryrefslogtreecommitdiffstats
path: root/components/proximity_auth/webui/proximity_auth_webui_handler.h
diff options
context:
space:
mode:
authortengs <tengs@chromium.org>2015-08-04 14:24:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-04 21:27:36 +0000
commit101e7deedf67e77a97d7be64963b66f83d4cfc0c (patch)
treee1fc1c28b1a19a88e714cccb6f4100590608c39d /components/proximity_auth/webui/proximity_auth_webui_handler.h
parente1a6714b2fd15bd842eb26f7de34ec3d1a7964c7 (diff)
downloadchromium_src-101e7deedf67e77a97d7be64963b66f83d4cfc0c.zip
chromium_src-101e7deedf67e77a97d7be64963b66f83d4cfc0c.tar.gz
chromium_src-101e7deedf67e77a97d7be64963b66f83d4cfc0c.tar.bz2
Add "Reachable Phones" feature to chrome://proximity-auth.
This tab shows phones that have recently responded to a CryptAuth ping, so we can be confident that the phones are online and reachable. BUG=409158 TEST=manual Review URL: https://codereview.chromium.org/1259093006 Cr-Commit-Position: refs/heads/master@{#341796}
Diffstat (limited to 'components/proximity_auth/webui/proximity_auth_webui_handler.h')
-rw-r--r--components/proximity_auth/webui/proximity_auth_webui_handler.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.h b/components/proximity_auth/webui/proximity_auth_webui_handler.h
index ce6f3b69..d0e8907 100644
--- a/components/proximity_auth/webui/proximity_auth_webui_handler.h
+++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h
@@ -22,12 +22,17 @@ namespace base {
class ListValue;
}
+namespace cryptauth {
+class ExternalDeviceInfo;
+}
+
namespace proximity_auth {
class Authenticator;
class BluetoothConnection;
class Connection;
class ClientImpl;
+class ReachablePhoneFlow;
struct RemoteStatusUpdate;
class SecureContext;
@@ -65,6 +70,7 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
void GetLogMessages(const base::ListValue* args);
void ClearLogBuffer(const base::ListValue* args);
void FindEligibleUnlockDevices(const base::ListValue* args);
+ void FindReachableDevices(const base::ListValue* args);
void GetLocalState(const base::ListValue* args);
void ForceEnrollment(const base::ListValue* args);
void ForceDeviceSync(const base::ListValue* args);
@@ -82,6 +88,10 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
void OnFoundEligibleUnlockDevices(
const cryptauth::FindEligibleUnlockDevicesResponse& response);
+ // Callback when |reachable_phone_flow_| completes.
+ void OnReachablePhonesFound(
+ const std::vector<cryptauth::ExternalDeviceInfo>& reachable_phones);
+
// Called when the key agreement of PSK of the remote device completes.
void OnPSKDerived(const cryptauth::ExternalDeviceInfo& unlock_key,
const std::string& persistent_symmetric_key);
@@ -138,6 +148,9 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
// We only support one concurrent API call.
scoped_ptr<CryptAuthClient> cryptauth_client_;
+ // The flow for getting a list of reachable phones.
+ scoped_ptr<ReachablePhoneFlow> reachable_phone_flow_;
+
// True if the WebContents backing the WebUI has been initialized.
bool web_contents_initialized_;