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

Unified Diff: content/browser/geolocation/geolocation_dispatcher_host.h

Issue 722153003: Implement basic mojo Permission service and use it for Geolocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 1 month 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: content/browser/geolocation/geolocation_dispatcher_host.h
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.h b/content/browser/geolocation/geolocation_dispatcher_host.h
deleted file mode 100644
index 6359de10ccebe38e3aadd1a0992b3467231367b5..0000000000000000000000000000000000000000
--- a/content/browser/geolocation/geolocation_dispatcher_host.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
-#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
-
-#include <map>
-#include <vector>
-
-#include "base/callback_forward.h"
-#include "base/memory/weak_ptr.h"
-#include "content/public/browser/web_contents_observer.h"
-
-class GURL;
-
-namespace content {
-
-// GeolocationDispatcherHost is an observer for Geolocation permissions-related
-// messages. In this role, it's the complement of GeolocationDispatcher (owned
-// by RenderFrame).
-// TODO(blundell): Eliminate this class in favor of having
-// Mojo handle permissions for geolocation once there is resolution on how
-// that will work. crbug.com/420498
-class GeolocationDispatcherHost : public WebContentsObserver {
- public:
- explicit GeolocationDispatcherHost(WebContents* web_contents);
- ~GeolocationDispatcherHost() override;
-
- private:
- // WebContentsObserver
- void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
- void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
- const LoadCommittedDetails& details,
- const FrameNavigateParams& params) override;
- bool OnMessageReceived(const IPC::Message& msg,
- RenderFrameHost* render_frame_host) override;
-
- // Message handlers:
- // TODO(mlamouri): |requesting_origin| should be a security origin to
- // guarantee that a proper origin is passed.
- void OnRequestPermission(RenderFrameHost* render_frame_host,
- int bridge_id,
- const GURL& requesting_origin,
- bool user_gesture);
-
- void SendGeolocationPermissionResponse(int render_process_id,
- int render_frame_id,
- int bridge_id,
- bool allowed);
-
- // Clear pending permissions associated with a given frame and request the
- // browser to cancel the permission requests.
- void CancelPermissionRequestsForFrame(RenderFrameHost* render_frame_host);
-
- struct PendingPermission {
- PendingPermission(int render_frame_id,
- int render_process_id,
- int bridge_id,
- const GURL& origin);
- ~PendingPermission();
- int render_frame_id;
- int render_process_id;
- int bridge_id;
- GURL origin;
- };
- std::vector<PendingPermission> pending_permissions_;
-
- base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698