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

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

Issue 6597044: Revert 76228 - Move core pieces of geolocation from chrome to content.This is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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: content/browser/geolocation/geolocation_permission_context.h
===================================================================
--- content/browser/geolocation/geolocation_permission_context.h (revision 76230)
+++ content/browser/geolocation/geolocation_permission_context.h (working copy)
@@ -1,67 +0,0 @@
-// Copyright (c) 2010 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_PERMISSION_CONTEXT_H_
-#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
-#pragma once
-
-#include "base/basictypes.h"
-#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
-
-class GeolocationInfoBarQueueController;
-class GeolocationPermissionContext;
-class GURL;
-class InfoBarDelegate;
-class Profile;
-class RenderViewHost;
-class TabContents;
-
-// GeolocationPermissionContext manages Geolocation permissions flow,
-// and delegates UI handling via GeolocationInfoBarQueueController.
-// It always notifies the requesting render_view asynchronously via
-// ViewMsg_Geolocation_PermissionSet.
-class GeolocationPermissionContext
- : public base::RefCountedThreadSafe<GeolocationPermissionContext> {
- public:
- explicit GeolocationPermissionContext(Profile* profile);
-
- // The render is requesting permission to use Geolocation.
- // Response will be sent asynchronously as ViewMsg_Geolocation_PermissionSet.
- void RequestGeolocationPermission(
- int render_process_id, int render_view_id, int bridge_id,
- const GURL& requesting_frame);
-
- // The render is cancelling a pending permission request.
- void CancelGeolocationPermissionRequest(
- int render_process_id, int render_view_id, int bridge_id,
- const GURL& requesting_frame);
-
- // Notifies whether or not the corresponding bridge is allowed to use
- // geolocation via ViewMsg_Geolocation_PermissionSet.
- void NotifyPermissionSet(
- int render_process_id, int render_view_id, int bridge_id,
- const GURL& requesting_frame, bool allowed);
-
- private:
- friend class base::RefCountedThreadSafe<GeolocationPermissionContext>;
- virtual ~GeolocationPermissionContext();
-
- // Calls GeolocationArbitrator::OnPermissionGranted.
- void NotifyArbitratorPermissionGranted(const GURL& requesting_frame);
-
- // Removes any pending InfoBar request.
- void CancelPendingInfoBarRequest(
- int render_process_id, int render_view_id, int bridge_id);
-
- // This should only be accessed from the UI thread.
- Profile* const profile_;
-
- scoped_ptr<GeolocationInfoBarQueueController>
- geolocation_infobar_queue_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContext);
-};
-
-#endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
« no previous file with comments | « content/browser/geolocation/geolocation_observer.h ('k') | content/browser/geolocation/geolocation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698