| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 /* |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 // found in the LICENSE file. | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are |
| 6 * met: |
| 7 * |
| 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above |
| 11 * copyright notice, this list of conditions and the following disclaimer |
| 12 * in the documentation and/or other materials provided with the |
| 13 * distribution. |
| 14 * * Neither the name of Google Inc. nor the names of its |
| 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. |
| 17 * |
| 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ |
| 4 | 30 |
| 5 #ifndef WEBKIT_GLUE_INSPECTOR_CLIENT_IMPL_H_ | 31 #ifndef InspectorClientImpl_h |
| 6 #define WEBKIT_GLUE_INSPECTOR_CLIENT_IMPL_H_ | 32 #define InspectorClientImpl_h |
| 7 | 33 |
| 8 #include "InspectorClient.h" | 34 #include "InspectorClient.h" |
| 9 #include "InspectorController.h" | 35 #include "InspectorController.h" |
| 10 #include <wtf/OwnPtr.h> | 36 #include <wtf/OwnPtr.h> |
| 11 | 37 |
| 12 class WebNodeHighlight; | |
| 13 class WebViewImpl; | 38 class WebViewImpl; |
| 14 | 39 |
| 40 namespace WebKit { |
| 41 |
| 15 class InspectorClientImpl : public WebCore::InspectorClient { | 42 class InspectorClientImpl : public WebCore::InspectorClient { |
| 16 public: | 43 public: |
| 17 InspectorClientImpl(WebViewImpl*); | 44 InspectorClientImpl(WebViewImpl*); |
| 18 ~InspectorClientImpl(); | 45 ~InspectorClientImpl(); |
| 19 | 46 |
| 20 // InspectorClient | 47 // InspectorClient methods: |
| 21 virtual void inspectorDestroyed(); | 48 virtual void inspectorDestroyed(); |
| 49 virtual WebCore::Page* createPage(); |
| 50 virtual WebCore::String localizedStringsURL(); |
| 51 virtual WebCore::String hiddenPanels(); |
| 52 virtual void showWindow(); |
| 53 virtual void closeWindow(); |
| 54 virtual bool windowVisible(); |
| 55 virtual void attachWindow(); |
| 56 virtual void detachWindow(); |
| 57 virtual void setAttachedWindowHeight(unsigned height); |
| 58 virtual void highlight(WebCore::Node*); |
| 59 virtual void hideHighlight(); |
| 60 virtual void inspectedURLChanged(const WebCore::String& newURL); |
| 61 virtual void populateSetting( |
| 62 const WebCore::String& key, |
| 63 WebCore::InspectorController::Setting&); |
| 64 virtual void storeSetting( |
| 65 const WebCore::String& key, |
| 66 const WebCore::InspectorController::Setting&); |
| 67 virtual void removeSetting(const WebCore::String& key); |
| 68 virtual void inspectorWindowObjectCleared(); |
| 22 | 69 |
| 23 virtual WebCore::Page* createPage(); | 70 private: |
| 24 virtual WebCore::String localizedStringsURL(); | 71 void loadSettings(); |
| 25 virtual WebCore::String hiddenPanels(); | 72 void saveSettings(); |
| 26 virtual void showWindow(); | |
| 27 virtual void closeWindow(); | |
| 28 virtual bool windowVisible(); | |
| 29 | 73 |
| 30 virtual void attachWindow(); | 74 // The WebViewImpl of the page being inspected; gets passed to the constructor |
| 31 virtual void detachWindow(); | 75 WebViewImpl* m_inspectedWebView; |
| 32 | 76 |
| 33 virtual void setAttachedWindowHeight(unsigned height); | 77 typedef HashMap<WebCore::String, WebCore::InspectorController::Setting> SettingsMap; |
| 34 | 78 OwnPtr<SettingsMap> m_settings; |
| 35 virtual void highlight(WebCore::Node*); | |
| 36 virtual void hideHighlight(); | |
| 37 | |
| 38 virtual void inspectedURLChanged(const WebCore::String& newURL); | |
| 39 | |
| 40 virtual void populateSetting( | |
| 41 const WebCore::String& key, | |
| 42 WebCore::InspectorController::Setting&); | |
| 43 virtual void storeSetting( | |
| 44 const WebCore::String& key, | |
| 45 const WebCore::InspectorController::Setting&); | |
| 46 virtual void removeSetting(const WebCore::String& key); | |
| 47 | |
| 48 virtual void inspectorWindowObjectCleared(); | |
| 49 | |
| 50 private: | |
| 51 void LoadSettings(); | |
| 52 void SaveSettings(); | |
| 53 | |
| 54 // The WebViewImpl of the page being inspected; gets passed to the constructor | |
| 55 WebViewImpl* inspected_web_view_; | |
| 56 | |
| 57 typedef HashMap<WebCore::String, WebCore::InspectorController::Setting> | |
| 58 SettingsMap; | |
| 59 OwnPtr<SettingsMap> settings_; | |
| 60 }; | 79 }; |
| 61 | 80 |
| 62 #endif // WEBKIT_GLUE_INSPECTOR_CLIENT_IMPL_H_ | 81 } // namespace WebKit |
| 82 |
| 83 #endif |
| OLD | NEW |