// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516#ifndef WEBDRIVER_IE_ELEMENTREPOSITORY_H_17#define WEBDRIVER_IE_ELEMENTREPOSITORY_H_1819#include <unordered_map>2021#include "CustomTypes.h"22#include "DocumentHost.h"2324namespace webdriver {2526class ElementRepository {27public:28ElementRepository(void);29virtual ~ElementRepository(void);30int GetManagedElement(const std::string& element_id,31ElementHandle* element_wrapper) const;32bool AddManagedElement(BrowserHandle current_browser,33IHTMLElement* element,34ElementHandle* element_wrapper);35bool AddManagedElement(ElementHandle element_wrapper);36void RemoveManagedElement(const std::string& element_id);37void ListManagedElements(void);38void ClearCache(void);39void Clear(void);40private:41bool IsElementManaged(IHTMLElement* element, ElementHandle* element_wrapper);42typedef std::unordered_map<std::string, ElementHandle> ElementMap;43ElementMap managed_elements_;44};4546} // namespace webdriver4748#endif // WEBDRIVER_IE_ELEMENTREPOSITORY_H_495051