From 5d62986966f1a5ff8d26a68c01ac5ae0cd139a74 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 23 May 2012 10:49:44 -0400 Subject: [PATCH] Bug 748384 - Remove the DrawMetadataProvider which is not being used any more. r=Cwiiis --- mobile/android/chrome/content/browser.js | 10 ---------- widget/android/AndroidBridge.cpp | 15 --------------- widget/android/AndroidBridge.h | 2 -- widget/android/nsIAndroidBridge.idl | 8 +------- 4 files changed, 1 insertion(+), 34 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 8cbec3c00100..1914421b173e 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -119,14 +119,6 @@ var Strings = {}; }); }); -var MetadataProvider = { - getDrawMetadata: function getDrawMetadata() { - let viewport = BrowserApp.selectedTab.getViewport(); - viewport.zoom = BrowserApp.selectedTab._drawZoom; - return JSON.stringify(viewport); - }, -}; - var BrowserApp = { _tabs: [], _selectedTab: null, @@ -141,8 +133,6 @@ var BrowserApp = { BrowserEventHandler.init(); ViewportHandler.init(); - getBridge().setDrawMetadataProvider(MetadataProvider); - getBridge().browserApp = this; Services.obs.addObserver(this, "Tab:Add", false); diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 0ee677c74ef7..b9b6b1824740 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -1631,14 +1631,6 @@ AndroidBridge::HandleGeckoMessage(const nsAString &aMessage, nsAString &aRet) ALOG_BRIDGE("leaving %s", __PRETTY_FUNCTION__); } -static nsCOMPtr gDrawMetadataProvider = NULL; - -nsCOMPtr -AndroidBridge::GetDrawMetadataProvider() -{ - return gDrawMetadataProvider; -} - void AndroidBridge::CheckURIVisited(const nsAString& aURI) { @@ -2098,13 +2090,6 @@ NS_IMETHODIMP nsAndroidBridge::HandleGeckoMessage(const nsAString & message, nsA return NS_OK; } -/* void SetDrawMetadataProvider (in nsIAndroidDrawMetadataProvider message); */ -NS_IMETHODIMP nsAndroidBridge::SetDrawMetadataProvider(nsIAndroidDrawMetadataProvider *aProvider) -{ - gDrawMetadataProvider = aProvider; - return NS_OK; -} - void AndroidBridge::NotifyDefaultPrevented(bool aDefaultPrevented) { diff --git a/widget/android/AndroidBridge.h b/widget/android/AndroidBridge.h index 1747c53ebdd5..a2db4111810d 100644 --- a/widget/android/AndroidBridge.h +++ b/widget/android/AndroidBridge.h @@ -304,8 +304,6 @@ public: void HandleGeckoMessage(const nsAString& message, nsAString &aRet); - nsCOMPtr GetDrawMetadataProvider(); - void CheckURIVisited(const nsAString& uri); void MarkURIVisited(const nsAString& uri); diff --git a/widget/android/nsIAndroidBridge.idl b/widget/android/nsIAndroidBridge.idl index 17af41f2d5df..3fc6dfccc577 100644 --- a/widget/android/nsIAndroidBridge.idl +++ b/widget/android/nsIAndroidBridge.idl @@ -5,11 +5,6 @@ #include "nsISupports.idl" #include "nsIDOMWindow.idl" -[scriptable, uuid(56fd8e18-a5cf-4e7a-92ba-4f68b4ad50ac)] -interface nsIAndroidDrawMetadataProvider : nsISupports { - AString getDrawMetadata(); -}; - [scriptable, uuid(0843f3c1-043e-4c64-9d8c-091370548c05)] interface nsIBrowserTab : nsISupports { readonly attribute nsIDOMWindow window; @@ -21,10 +16,9 @@ interface nsIAndroidBrowserApp : nsISupports { nsIBrowserTab getBrowserTab(in PRInt32 tabId); }; -[scriptable, uuid(7dd8441a-4f38-49b2-bd90-da69d02a96cf)] +[scriptable, uuid(bbb8e0d7-5cca-4ad0-88be-538ce6d04f63)] interface nsIAndroidBridge : nsISupports { AString handleGeckoMessage(in AString message); - void setDrawMetadataProvider(in nsIAndroidDrawMetadataProvider provider); attribute nsIAndroidBrowserApp browserApp; };