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

Side by Side Diff: content/shell/renderer/test_runner/web_ax_object_proxy.cc

Issue 1094103006: Implement test runner AX API to show context menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/test_runner/web_ax_object_proxy.h" 5 #include "content/shell/renderer/test_runner/web_ax_object_proxy.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "gin/handle.h" 8 #include "gin/handle.h"
9 #include "third_party/WebKit/public/platform/WebPoint.h" 9 #include "third_party/WebKit/public/platform/WebPoint.h"
10 #include "third_party/WebKit/public/platform/WebRect.h" 10 #include "third_party/WebKit/public/platform/WebRect.h"
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 accessibility_object_.updateLayoutAndCheckValidity(); 1057 accessibility_object_.updateLayoutAndCheckValidity();
1058 accessibility_object_.increment(); 1058 accessibility_object_.increment();
1059 } 1059 }
1060 1060
1061 void WebAXObjectProxy::Decrement() { 1061 void WebAXObjectProxy::Decrement() {
1062 accessibility_object_.updateLayoutAndCheckValidity(); 1062 accessibility_object_.updateLayoutAndCheckValidity();
1063 accessibility_object_.decrement(); 1063 accessibility_object_.decrement();
1064 } 1064 }
1065 1065
1066 void WebAXObjectProxy::ShowMenu() { 1066 void WebAXObjectProxy::ShowMenu() {
1067 accessibility_object_.showContextMenu();
1067 } 1068 }
1068 1069
1069 void WebAXObjectProxy::Press() { 1070 void WebAXObjectProxy::Press() {
1070 accessibility_object_.updateLayoutAndCheckValidity(); 1071 accessibility_object_.updateLayoutAndCheckValidity();
1071 accessibility_object_.press(); 1072 accessibility_object_.press();
1072 } 1073 }
1073 1074
1074 bool WebAXObjectProxy::IsEqual(v8::Handle<v8::Object> proxy) { 1075 bool WebAXObjectProxy::IsEqual(v8::Handle<v8::Object> proxy) {
1075 WebAXObjectProxy* unwrapped_proxy = NULL; 1076 WebAXObjectProxy* unwrapped_proxy = NULL;
1076 if (!gin::ConvertFromV8(blink::mainThreadIsolate(), proxy, &unwrapped_proxy)) 1077 if (!gin::ConvertFromV8(blink::mainThreadIsolate(), proxy, &unwrapped_proxy))
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 v8::Handle<v8::Value> value_handle = gin::CreateHandle( 1205 v8::Handle<v8::Value> value_handle = gin::CreateHandle(
1205 isolate, new RootWebAXObjectProxy(object, this)).ToV8(); 1206 isolate, new RootWebAXObjectProxy(object, this)).ToV8();
1206 if (value_handle.IsEmpty()) 1207 if (value_handle.IsEmpty())
1207 return v8::Handle<v8::Object>(); 1208 return v8::Handle<v8::Object>();
1208 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate); 1209 v8::Handle<v8::Object> handle = value_handle->ToObject(isolate);
1209 elements_.Append(handle); 1210 elements_.Append(handle);
1210 return handle; 1211 return handle;
1211 } 1212 }
1212 1213
1213 } // namespace content 1214 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698