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

Side by Side Diff: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc

Issue 2889523003: Add kApplicationIdKey for ShellSurface::GetApplicationId and SetApplicationId (Closed)
Patch Set: Fix shell_surface_unittest. Created 3 years, 7 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 | chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bri dge.h" 5 #include "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bri dge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
(...skipping 14 matching lines...) Expand all
25 if (!window) 25 if (!window)
26 return nullptr; 26 return nullptr;
27 27
28 exo::Surface* arc_surface = exo::Surface::AsSurface(window); 28 exo::Surface* arc_surface = exo::Surface::AsSurface(window);
29 if (!arc_surface) 29 if (!arc_surface)
30 arc_surface = exo::ShellSurface::GetMainSurface(window); 30 arc_surface = exo::ShellSurface::GetMainSurface(window);
31 return arc_surface; 31 return arc_surface;
32 } 32 }
33 33
34 int32_t GetTaskId(aura::Window* window) { 34 int32_t GetTaskId(aura::Window* window) {
35 const std::string arc_app_id = exo::ShellSurface::GetApplicationId(window); 35 const std::string* arc_app_id = exo::ShellSurface::GetApplicationId(window);
36 if (arc_app_id.empty()) 36 if (!arc_app_id)
37 return kNoTaskId; 37 return kNoTaskId;
38 38
39 int32_t task_id = kNoTaskId; 39 int32_t task_id = kNoTaskId;
40 if (sscanf(arc_app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1) 40 if (sscanf(arc_app_id->c_str(), "org.chromium.arc.%d", &task_id) != 1)
41 return kNoTaskId; 41 return kNoTaskId;
42 42
43 return task_id; 43 return task_id;
44 } 44 }
45 45
46 void DispatchFocusChange(arc::mojom::AccessibilityNodeInfoData* node_data) { 46 void DispatchFocusChange(arc::mojom::AccessibilityNodeInfoData* node_data) {
47 chromeos::AccessibilityManager* accessibility_manager = 47 chromeos::AccessibilityManager* accessibility_manager =
48 chromeos::AccessibilityManager::Get(); 48 chromeos::AccessibilityManager::Get();
49 if (!accessibility_manager) 49 if (!accessibility_manager)
50 return; 50 return;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 break; 264 break;
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 void ArcAccessibilityHelperBridge::OnTaskSetActive(int32_t task_id) { 269 void ArcAccessibilityHelperBridge::OnTaskSetActive(int32_t task_id) {
270 current_task_id_ = task_id; 270 current_task_id_ = task_id;
271 } 271 }
272 272
273 } // namespace arc 273 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698