| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 // Gets called from InspectorCompositeState::loadFromCookie(). | 78 // Gets called from InspectorCompositeState::loadFromCookie(). |
| 79 void setFromCookie(PassRefPtr<JSONObject>); | 79 void setFromCookie(PassRefPtr<JSONObject>); |
| 80 | 80 |
| 81 friend class InspectorCompositeState; | 81 friend class InspectorCompositeState; |
| 82 | 82 |
| 83 InspectorStateUpdateListener* m_listener; | 83 InspectorStateUpdateListener* m_listener; |
| 84 RefPtr<JSONObject> m_properties; | 84 RefPtr<JSONObject> m_properties; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class InspectorCompositeState : public InspectorStateUpdateListener { | 87 class InspectorCompositeState FINAL : public InspectorStateUpdateListener { |
| 88 public: | 88 public: |
| 89 InspectorCompositeState(InspectorStateClient* inspectorClient) | 89 InspectorCompositeState(InspectorStateClient* inspectorClient) |
| 90 : m_client(inspectorClient) | 90 : m_client(inspectorClient) |
| 91 , m_stateObject(JSONObject::create()) | 91 , m_stateObject(JSONObject::create()) |
| 92 , m_isMuted(false) | 92 , m_isMuted(false) |
| 93 { | 93 { |
| 94 } | 94 } |
| 95 virtual ~InspectorCompositeState() { } | 95 virtual ~InspectorCompositeState() { } |
| 96 | 96 |
| 97 void mute(); | 97 void mute(); |
| 98 void unmute(); | 98 void unmute(); |
| 99 | 99 |
| 100 InspectorState* createAgentState(const String&); | 100 InspectorState* createAgentState(const String&); |
| 101 void loadFromCookie(const String&); | 101 void loadFromCookie(const String&); |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 typedef HashMap<String, OwnPtr<InspectorState> > InspectorStateMap; | 104 typedef HashMap<String, OwnPtr<InspectorState> > InspectorStateMap; |
| 105 | 105 |
| 106 // From InspectorStateUpdateListener. | 106 // From InspectorStateUpdateListener. |
| 107 virtual void inspectorStateUpdated(); | 107 virtual void inspectorStateUpdated() OVERRIDE; |
| 108 | 108 |
| 109 InspectorStateClient* m_client; | 109 InspectorStateClient* m_client; |
| 110 RefPtr<JSONObject> m_stateObject; | 110 RefPtr<JSONObject> m_stateObject; |
| 111 bool m_isMuted; | 111 bool m_isMuted; |
| 112 InspectorStateMap m_inspectorStateMap; | 112 InspectorStateMap m_inspectorStateMap; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace WebCore | 115 } // namespace WebCore |
| 116 | 116 |
| 117 #endif // !defined(InspectorState_h) | 117 #endif // !defined(InspectorState_h) |
| OLD | NEW |