Bug 905892 - Clean up some geolocation #includes. rs=dougt

This commit is contained in:
Reuben Morais 2013-08-15 23:15:39 -03:00
parent 3a39c887ab
commit 20f7c727be
2 changed files with 4 additions and 38 deletions

View File

@ -2,51 +2,28 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsContentPermissionHelper.h"
#include "nsXULAppAPI.h"
#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/dom/PBrowserParent.h"
#include "mozilla/dom/ContentChild.h"
#include "nsNetUtil.h"
#include "nsFrameManager.h"
#include "nsFrameLoader.h"
#include "nsIFrameLoader.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocShellTreeItem.h"
#include "nsIWebProgressListener2.h"
#include "nsISettingsService.h"
#include "nsDOMEventTargetHelper.h"
#include "TabChild.h"
#include "nsGeolocation.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsIDOMWindow.h"
#include "nsDOMClassInfoID.h"
#include "nsComponentManagerUtils.h"
#include "nsICategoryManager.h"
#include "nsISupportsPrimitives.h"
#include "nsServiceManagerUtils.h"
#include "nsContentUtils.h"
#include "nsCxPusher.h"
#include "nsIURI.h"
#include "nsIPermissionManager.h"
#include "nsIDocument.h"
#include "nsIObserverService.h"
#include "nsPIDOMWindow.h"
#include "nsThreadUtils.h"
#include "mozilla/Services.h"
#include "mozilla/unused.h"
#include "mozilla/Preferences.h"
#include "mozilla/Attributes.h"
#include "mozilla/ClearOnShutdown.h"
#include <math.h>
#include <algorithm>
#include <limits>
class nsIPrincipal;
#ifdef MOZ_MAEMO_LIBLOCATION
#include "MaemoLocationProvider.h"
@ -68,8 +45,6 @@
#include "CoreLocationLocationProvider.h"
#endif
#include "nsIDocument.h"
// Some limit to the number of get or watch geolocation requests
// that a window can make.
#define MAX_GEO_REQUESTS_PER_WINDOW 1500
@ -415,11 +390,6 @@ nsGeolocationRequest::Cancel()
NS_IMETHODIMP
nsGeolocationRequest::Allow()
{
nsCOMPtr<nsIDOMWindow> window;
GetWindow(getter_AddRefs(window));
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(window);
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
// Kick off the geo device, if it isn't already running
nsRefPtr<nsGeolocationService> gs = nsGeolocationService::GetGeolocationService();
nsresult rv = gs->StartDevice(GetPrincipal());

View File

@ -5,18 +5,15 @@
#ifndef nsGeoLocation_h
#define nsGeoLocation_h
#include "mozilla/dom/PContentPermissionRequestChild.h"
// Microsoft's API Name hackery sucks
#undef CreateEvent
#include "mozilla/StaticPtr.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsCOMArray.h"
#include "nsTArray.h"
#include "nsITimer.h"
#include "nsIObserver.h"
#include "nsIURI.h"
#include "nsWrapperCache.h"
#include "nsWeakPtr.h"
@ -32,8 +29,6 @@
#include "mozilla/dom/PositionErrorBinding.h"
#include "mozilla/dom/CallbackObject.h"
#include "nsPIDOMWindow.h"
#include "nsIGeolocationProvider.h"
#include "nsIContentPermissionPrompt.h"
#include "DictionaryHelpers.h"
@ -41,6 +36,7 @@
#include "mozilla/Attributes.h"
class nsGeolocationService;
class nsIDOMWindow;
namespace mozilla {
namespace dom {