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

Unified Diff: mojo/services/html_viewer/html_document_view.cc

Issue 710803002: Beginning of an accessibility implementation for html_viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_document_view.cc
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc
index 01af412a39adb7b8cdca36545407a5a76d581c85..80b7bcd6272e90ca5ce46462f371bdb7bdb22b22 100644
--- a/mojo/services/html_viewer/html_document_view.cc
+++ b/mojo/services/html_viewer/html_document_view.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
#include "mojo/public/cpp/application/connect.h"
@@ -95,12 +96,13 @@ HTMLDocumentView::HTMLDocumentView(
root_(NULL),
view_manager_client_factory_(shell_.get(), this),
compositor_thread_(compositor_thread),
- web_media_player_factory_(web_media_player_factory),
- weak_factory_(this) {
+ web_media_player_factory_(web_media_player_factory) {
shell_.set_client(this);
}
HTMLDocumentView::~HTMLDocumentView() {
+ STLDeleteElements(&ax_provider_impls_);
+
if (web_view_)
web_view_->close();
if (root_)
@@ -109,6 +111,7 @@ HTMLDocumentView::~HTMLDocumentView() {
void HTMLDocumentView::AcceptConnection(const String& requestor_url,
ServiceProviderPtr provider) {
+ exported_services_.AddService(this);
exported_services_.AddService(&view_manager_client_factory_);
WeakBindToPipe(&exported_services_, provider.PassMessagePipe());
Load(response_.Pass());
@@ -133,6 +136,14 @@ void HTMLDocumentView::OnEmbed(
root_->AddObserver(this);
}
+void HTMLDocumentView::Create(ApplicationConnection* connection,
+ InterfaceRequest<AxProvider> request) {
+ if (!web_view_)
+ return;
+ ax_provider_impls_.insert(
+ WeakBindToRequest(new AxProviderImpl(web_view_), &request));
+}
+
void HTMLDocumentView::OnViewManagerDisconnected(ViewManager* view_manager) {
// TODO(aa): Need to figure out how shutdown works.
}
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698