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

Unified Diff: ui/accessibility/platform/ax_platform_unique_id.cc

Issue 2746813002: Hide AXPlatformNode on ChromeOS. (Closed)
Patch Set: has_native_accessibility Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/accessibility/platform/ax_platform_unique_id.h ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/platform/ax_platform_unique_id.cc
diff --git a/ui/accessibility/platform/ax_platform_unique_id.cc b/ui/accessibility/platform/ax_platform_unique_id.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ece23eb421e54f01c33d9bdb240ffc400b3f18cc
--- /dev/null
+++ b/ui/accessibility/platform/ax_platform_unique_id.cc
@@ -0,0 +1,20 @@
+// Copyright 2017 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.
+
+#include "ui/accessibility/platform/ax_platform_unique_id.h"
+
+namespace ui {
+
+int32_t GetNextAXPlatformNodeUniqueId() {
+ static int32_t next_unique_id = 1;
+ int32_t unique_id = next_unique_id;
+ if (next_unique_id == INT32_MAX)
+ next_unique_id = 1;
+ else
+ next_unique_id++;
+
+ return unique_id;
+}
+
+} // namespace ui
« no previous file with comments | « ui/accessibility/platform/ax_platform_unique_id.h ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698