Opera 12.15 Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dochand_module.cpp 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
  2. **
  3. ** Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
  4. **
  5. ** This file is part of the Opera web browser. It may not be distributed
  6. ** under any circumstances.
  7. */
  8. #include "core/pch.h"
  9. #include "modules/dochand/dochand_module.h"
  10. #include "modules/dochand/winman.h"
  11. #include "modules/url/url_lop_api.h" // OperaURL_Generator, so that we can delete them
  12. DochandModule::DochandModule() :
  13. window_manager(NULL)
  14. #ifdef WEBSERVER_SUPPORT
  15. , unitewarningpage_generator(NULL)
  16. #endif // WEBSERVER_SUPPORT
  17. {
  18. }
  19. void
  20. DochandModule::InitL(const OperaInitInfo& info)
  21. {
  22. window_manager = OP_NEW_L(WindowManager, ());
  23. window_manager->ConstructL();
  24. }
  25. void
  26. DochandModule::Destroy()
  27. {
  28. #ifdef WEBSERVER_SUPPORT
  29. OP_DELETE(unitewarningpage_generator);
  30. unitewarningpage_generator = NULL;
  31. #endif // WEBSERVER_SUPPORT
  32. if (window_manager)
  33. {
  34. window_manager->Clear();
  35. WindowManager* wmSave = window_manager;
  36. window_manager = NULL;
  37. OP_DELETE(wmSave);
  38. }
  39. if (imgManager)
  40. // Make sure all UrlImageContentProviders are destroyed by clearing the image cache.
  41. imgManager->SetCacheSize(0, IMAGE_CACHE_POLICY_STRICT);
  42. }