Commit 3a0b1260 authored by Mark Capella's avatar Mark Capella
Browse files

Bug 721496 - Remove MOZ_WINSDK_TARGETVER ifdefs for pre-Windows 7 SDKs. r=jimm

parent 506fba2f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -336,7 +336,6 @@ nsWindowsShellService::ShortcutMaintenance()
bool
nsWindowsShellService::IsDefaultBrowserVista(bool* aIsDefaultBrowser)
{
#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
  IApplicationAssociationRegistration* pAAR;
  
  HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
@@ -355,7 +354,6 @@ nsWindowsShellService::IsDefaultBrowserVista(bool* aIsDefaultBrowser)
    pAAR->Release();
    return true;
  }
#endif  
  return false;
}

+0 −2
Original line number Diff line number Diff line
@@ -979,8 +979,6 @@ EOF

    AC_DEFINE_UNQUOTED(MOZ_WINSDK_TARGETVER,0x$MOZ_WINSDK_TARGETVER)
    # Definitions matching sdkddkver.h
    AC_DEFINE_UNQUOTED(MOZ_NTDDI_WS03, 0x05020000)
    AC_DEFINE_UNQUOTED(MOZ_NTDDI_LONGHORN, 0x06000000)
    AC_DEFINE_UNQUOTED(MOZ_NTDDI_WIN7, 0x06010000)
    ;;
esac
+2 −2
Original line number Diff line number Diff line
@@ -625,7 +625,7 @@ PluginModuleChild::AnswerNP_Shutdown(NPError *rv)
{
    AssertPluginThread();

#if defined XP_WIN && MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
#if defined XP_WIN
    mozilla::widget::StopAudioSession();
#endif

@@ -689,7 +689,7 @@ PluginModuleChild::RecvSetAudioSessionData(const nsID& aId,
                                           const nsString& aDisplayName,
                                           const nsString& aIconPath)
{
#if !defined XP_WIN || MOZ_WINSDK_TARGETVER < MOZ_NTDDI_LONGHORN
#if !defined XP_WIN
    NS_RUNTIMEABORT("Not Reached!");
    return false;
#else
+1 −1
Original line number Diff line number Diff line
@@ -776,7 +776,7 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
    if (!CallNP_Initialize(error))
        return NS_ERROR_FAILURE;

#if defined XP_WIN && MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
#if defined XP_WIN
    // Send the info needed to join the chrome process's audio session to the
    // plugin process
    nsID id;
+0 −9
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ namespace hal_impl {

static nsCOMPtr<nsITimer> sUpdateTimer;

#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
/* Power Event API is Vista or later */
typedef HPOWERNOTIFY (WINAPI *REGISTERPOWERSETTINGNOTIFICATION) (HANDLE, LPCGUID, DWORD);
typedef BOOL (WINAPI *UNREGISTERPOWERSETTINGNOTIFICATION) (HPOWERNOTIFY);
@@ -59,8 +58,6 @@ static UNREGISTERPOWERSETTINGNOTIFICATION sUnregisterPowerSettingNotification =
static HPOWERNOTIFY sPowerHandle = nsnull;
static HPOWERNOTIFY sCapacityHandle = nsnull;
static HWND sHWnd = nsnull;
#endif


static bool
IsVistaOrLater()
@@ -91,7 +88,6 @@ UpdateHandler(nsITimer* aTimer, void* aClosure) {
  }
}

#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
static
LRESULT CALLBACK
BatteryWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
@@ -107,12 +103,10 @@ BatteryWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
  hal::NotifyBatteryChange(currentInfo);
  return TRUE;
}
#endif

void
EnableBatteryNotifications()
{
#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
  if (IsVistaOrLater()) {
    // RegisterPowerSettingNotification is from Vista or later.
    // Use this API if available.
@@ -163,7 +157,6 @@ EnableBatteryNotifications()
                                        &GUID_BATTERY_PERCENTAGE_REMAINING,
                                        DEVICE_NOTIFY_WINDOW_HANDLE);
  } else
#endif
  {
    // for Windows 2000 and Windwos XP.  If we remove Windows XP support,
    // we should remove timer-based power notification
@@ -181,7 +174,6 @@ EnableBatteryNotifications()
void
DisableBatteryNotifications()
{
#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
  if (IsVistaOrLater()) {
    if (sPowerHandle) {
      sUnregisterPowerSettingNotification(sPowerHandle);
@@ -198,7 +190,6 @@ DisableBatteryNotifications()
      sHWnd = nsnull;
    }
  } else
#endif
  {
    if (sUpdateTimer) {
      sUpdateTimer->Cancel();
Loading