Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: webkit/glue/webaccessibilitymanager_impl.h

Issue 348063: Introduce WebAccessibilityControllerImpl.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Licked clean. Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webaccessibilitymanager_impl.h
===================================================================
--- webkit/glue/webaccessibilitymanager_impl.h (revision 30964)
+++ webkit/glue/webaccessibilitymanager_impl.h (working copy)
@@ -1,76 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_GLUE_WEBACCESSIBILITYMANAGER_IMPL_H_
-#define WEBKIT_GLUE_WEBACCESSIBILITYMANAGER_IMPL_H_
-
-#include "base/hash_tables.h"
-#include "webkit/glue/webaccessibilitymanager.h"
-
-class GlueAccessibilityObject;
-
-////////////////////////////////////////////////////////////////////////////////
-//
-// WebAccessibilityManagerImpl
-//
-//
-// Implements WebAccessibilityManager.
-// Responds to incoming accessibility requests from the browser side. Retrieves
-// the requested information from the active AccessibilityObject, through the
-// GlueAccessibilityObject.
-////////////////////////////////////////////////////////////////////////////////
-
-namespace webkit_glue {
-
-class WebAccessibilityManagerImpl : public WebAccessibilityManager {
- public:
- // From WebAccessibilityManager.
- bool GetAccObjInfo(WebKit::WebView* view,
- const WebAccessibility::InParams& in_params,
- WebAccessibility::OutParams* out_params);
- bool ClearAccObjMap(int acc_obj_id, bool clear_all);
- int FocusAccObj(const WebKit::WebAccessibilityObject& object);
-
- protected:
- // Needed so WebAccessibilityManager::Create can call our constructor.
- friend class WebAccessibilityManager;
-
- // Constructor creates a new GlueAccessibilityObjectRoot, and initializes
- // the root |acc_obj_id_| to 1000, to avoid conflicts with platform-specific
- // child ids.
- WebAccessibilityManagerImpl();
- ~WebAccessibilityManagerImpl();
-
- private:
- // From WebAccessibilityManager.
- bool InitAccObjRoot(WebKit::WebView* view);
-
- // Wrapper around the pointer that holds the root of the AccessibilityObject
- // tree, to allow the use of a scoped_refptr.
- struct GlueAccessibilityObjectRoot;
- GlueAccessibilityObjectRoot* root_;
-
- typedef base::hash_map<int, GlueAccessibilityObject*> IntToGlueAccObjMap;
- typedef base::hash_map<WebCore::AccessibilityObject*, int> AccObjToIntMap;
-
- // Hashmap for cashing of elements in use by the AT, mapping id (int) to a
- // GlueAccessibilityObject pointer.
- IntToGlueAccObjMap int_to_glue_acc_obj_map_;
- // Hashmap for cashing of elements in use by the AT, mapping a
- // AccessibilityObject pointer to its id (int). Needed for reverse lookup,
- // to ensure unnecessary duplicate entries are not created in the
- // IntToGlueAccObjMap (above) and for focus changes in WebKit.
- AccObjToIntMap acc_obj_to_int_map_;
-
- // Unique identifier for retrieving an accessibility object from the page's
- // hashmaps. Id is always 0 for the root of the accessibility object
- // hierarchy (on a per-renderer process basis).
- int acc_obj_id_;
-
- DISALLOW_COPY_AND_ASSIGN(WebAccessibilityManagerImpl);
-};
-
-} // namespace webkit_glue
-
-#endif // WEBKIT_GLUE_WEBACCESSIBILITYMANAGER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698