InspectorClientEfl.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (C) 2007 Apple Inc. All rights reserved.
  3. * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
  4. * Copyright (C) 2009-2010 ProFUSION embedded systems
  5. * Copyright (C) 2009-2012 Samsung Electronics
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
  21. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  22. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  23. * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
  24. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  25. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  26. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  27. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  29. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. #ifndef InspectorClientEfl_h
  32. #define InspectorClientEfl_h
  33. #if ENABLE(INSPECTOR)
  34. #include "InspectorClient.h"
  35. #include "InspectorFrontendChannel.h"
  36. #include "InspectorFrontendClientLocal.h"
  37. #include <Evas.h>
  38. #include <wtf/Forward.h>
  39. namespace WebCore {
  40. class InspectorFrontendClientEfl;
  41. class InspectorClientEfl : public InspectorClient, public InspectorFrontendChannel {
  42. public:
  43. explicit InspectorClientEfl(Evas_Object*);
  44. ~InspectorClientEfl();
  45. virtual void inspectorDestroyed();
  46. virtual InspectorFrontendChannel* openInspectorFrontend(InspectorController*);
  47. virtual void closeInspectorFrontend();
  48. virtual void bringFrontendToFront();
  49. virtual void highlight();
  50. virtual void hideHighlight();
  51. virtual bool sendMessageToFrontend(const String&);
  52. void releaseFrontendPage();
  53. String inspectorFilesPath();
  54. private:
  55. Evas_Object* m_inspectedView;
  56. Evas_Object* m_inspectorView;
  57. InspectorFrontendClientEfl* m_frontendClient;
  58. };
  59. class InspectorFrontendClientEfl : public InspectorFrontendClientLocal {
  60. public:
  61. InspectorFrontendClientEfl(Evas_Object*, Evas_Object*, InspectorClientEfl*);
  62. ~InspectorFrontendClientEfl();
  63. virtual String localizedStringsURL();
  64. virtual void bringToFront();
  65. virtual void closeWindow();
  66. virtual void inspectedURLChanged(const String&);
  67. virtual void attachWindow(DockSide);
  68. virtual void detachWindow();
  69. virtual void setAttachedWindowHeight(unsigned);
  70. virtual void setAttachedWindowWidth(unsigned);
  71. virtual void setToolbarHeight(unsigned) OVERRIDE;
  72. void disconnectInspectorClient() { m_inspectorClient = 0; }
  73. void destroyInspectorWindow(bool notifyInspectorController);
  74. private:
  75. Evas_Object* m_inspectedView;
  76. Evas_Object* m_inspectorView;
  77. InspectorClientEfl* m_inspectorClient;
  78. };
  79. }
  80. #endif
  81. #endif // InspectorClientEfl_h