PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloaterwebcontent.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 113 lines | 68 code | 19 blank | 26 comment | 0 complexity | 7c31c2f4d2dff3669b6822a53c714252 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfloaterwebcontent.h
  3. * @brief floater for displaying web content - e.g. profiles and search (eventually)
  4. *
  5. * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLFLOATERWEBCONTENT_H
  27. #define LL_LLFLOATERWEBCONTENT_H
  28. #include "llfloater.h"
  29. #include "llmediactrl.h"
  30. #include "llsdparam.h"
  31. class LLMediaCtrl;
  32. class LLComboBox;
  33. class LLTextBox;
  34. class LLProgressBar;
  35. class LLIconCtrl;
  36. class LLFloaterWebContent :
  37. public LLFloater,
  38. public LLViewerMediaObserver,
  39. public LLInstanceTracker<LLFloaterWebContent, std::string>
  40. {
  41. public:
  42. typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
  43. LOG_CLASS(LLFloaterWebContent);
  44. struct _Params : public LLInitParam::Block<_Params>
  45. {
  46. Optional<std::string> url,
  47. target,
  48. window_class,
  49. id;
  50. Optional<bool> show_chrome,
  51. allow_address_entry,
  52. trusted_content,
  53. show_page_title;
  54. Optional<LLRect> preferred_media_size;
  55. _Params();
  56. };
  57. typedef LLSDParamAdapter<_Params> Params;
  58. LLFloaterWebContent(const Params& params);
  59. void initializeURLHistory();
  60. static LLFloater* create(Params);
  61. static void closeRequest(const std::string &uuid);
  62. static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
  63. void geometryChanged(S32 x, S32 y, S32 width, S32 height);
  64. /* virtual */ BOOL postBuild();
  65. /* virtual */ void onOpen(const LLSD& key);
  66. /* virtual */ bool matchesKey(const LLSD& key);
  67. /* virtual */ void onClose(bool app_quitting);
  68. /* virtual */ void draw();
  69. protected:
  70. // inherited from LLViewerMediaObserver
  71. /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
  72. void onClickBack();
  73. void onClickForward();
  74. void onClickReload();
  75. void onClickStop();
  76. void onEnterAddress();
  77. void onPopExternal();
  78. static void preCreate(Params& p);
  79. void open_media(const Params& );
  80. void set_current_url(const std::string& url);
  81. LLMediaCtrl* mWebBrowser;
  82. LLComboBox* mAddressCombo;
  83. LLIconCtrl* mSecureLockIcon;
  84. LLTextBox* mStatusBarText;
  85. LLProgressBar* mStatusBarProgress;
  86. LLView* mBtnBack;
  87. LLView* mBtnForward;
  88. LLView* mBtnReload;
  89. LLView* mBtnStop;
  90. std::string mCurrentURL;
  91. std::string mUUID;
  92. bool mShowPageTitle;
  93. };
  94. #endif // LL_LLFLOATERWEBCONTENT_H