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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "components/prefs/pref_service.h" 58 #include "components/prefs/pref_service.h"
59 #include "components/user_manager/user_manager.h" 59 #include "components/user_manager/user_manager.h"
60 #include "content/public/browser/browser_accessibility_state.h" 60 #include "content/public/browser/browser_accessibility_state.h"
61 #include "content/public/browser/browser_thread.h" 61 #include "content/public/browser/browser_thread.h"
62 #include "content/public/browser/notification_details.h" 62 #include "content/public/browser/notification_details.h"
63 #include "content/public/browser/notification_service.h" 63 #include "content/public/browser/notification_service.h"
64 #include "content/public/browser/notification_source.h" 64 #include "content/public/browser/notification_source.h"
65 #include "content/public/browser/render_view_host.h" 65 #include "content/public/browser/render_view_host.h"
66 #include "content/public/browser/web_ui.h" 66 #include "content/public/browser/web_ui.h"
67 #include "content/public/common/content_switches.h" 67 #include "content/public/common/content_switches.h"
68 #include "content/public/common/mojo_shell_connection.h" 68 #include "content/public/common/service_manager_connection.h"
69 #include "extensions/browser/event_router.h" 69 #include "extensions/browser/event_router.h"
70 #include "extensions/browser/extension_registry.h" 70 #include "extensions/browser/extension_registry.h"
71 #include "extensions/browser/extension_system.h" 71 #include "extensions/browser/extension_system.h"
72 #include "extensions/common/extension.h" 72 #include "extensions/common/extension.h"
73 #include "extensions/common/extension_messages.h" 73 #include "extensions/common/extension_messages.h"
74 #include "extensions/common/extension_resource.h" 74 #include "extensions/common/extension_resource.h"
75 #include "extensions/common/host_id.h" 75 #include "extensions/common/host_id.h"
76 #include "mash/public/interfaces/launchable.mojom.h" 76 #include "mash/public/interfaces/launchable.mojom.h"
77 #include "media/audio/sounds/sounds_manager.h" 77 #include "media/audio/sounds/sounds_manager.h"
78 #include "services/shell/public/cpp/connector.h" 78 #include "services/shell/public/cpp/connector.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 bool enabled = 595 bool enabled =
596 profile_->GetPrefs()->GetBoolean(prefs::kAccessibilityAutoclickEnabled); 596 profile_->GetPrefs()->GetBoolean(prefs::kAccessibilityAutoclickEnabled);
597 597
598 if (autoclick_enabled_ == enabled) 598 if (autoclick_enabled_ == enabled)
599 return; 599 return;
600 autoclick_enabled_ = enabled; 600 autoclick_enabled_ = enabled;
601 601
602 if (chrome::IsRunningInMash()) { 602 if (chrome::IsRunningInMash()) {
603 shell::Connector* connector = 603 shell::Connector* connector =
604 content::MojoShellConnection::GetForProcess()->GetConnector(); 604 content::ServiceManagerConnection::GetForProcess()->GetConnector();
605 mash::mojom::LaunchablePtr launchable; 605 mash::mojom::LaunchablePtr launchable;
606 connector->ConnectToInterface("service:accessibility_autoclick", 606 connector->ConnectToInterface("service:accessibility_autoclick",
607 &launchable); 607 &launchable);
608 launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT); 608 launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT);
609 return; 609 return;
610 } 610 }
611 611
612 ash::Shell::GetInstance()->autoclick_controller()->SetEnabled(enabled); 612 ash::Shell::GetInstance()->autoclick_controller()->SetEnabled(enabled);
613 } 613 }
614 614
(...skipping 17 matching lines...) Expand all
632 base::TimeDelta autoclick_delay_ms = base::TimeDelta::FromMilliseconds( 632 base::TimeDelta autoclick_delay_ms = base::TimeDelta::FromMilliseconds(
633 int64_t{profile_->GetPrefs()->GetInteger( 633 int64_t{profile_->GetPrefs()->GetInteger(
634 prefs::kAccessibilityAutoclickDelayMs)}); 634 prefs::kAccessibilityAutoclickDelayMs)});
635 635
636 if (autoclick_delay_ms == autoclick_delay_ms_) 636 if (autoclick_delay_ms == autoclick_delay_ms_)
637 return; 637 return;
638 autoclick_delay_ms_ = autoclick_delay_ms; 638 autoclick_delay_ms_ = autoclick_delay_ms;
639 639
640 if (chrome::IsRunningInMash()) { 640 if (chrome::IsRunningInMash()) {
641 shell::Connector* connector = 641 shell::Connector* connector =
642 content::MojoShellConnection::GetForProcess()->GetConnector(); 642 content::ServiceManagerConnection::GetForProcess()->GetConnector();
643 ash::autoclick::mojom::AutoclickControllerPtr autoclick_controller; 643 ash::autoclick::mojom::AutoclickControllerPtr autoclick_controller;
644 connector->ConnectToInterface("service:accessibility_autoclick", 644 connector->ConnectToInterface("service:accessibility_autoclick",
645 &autoclick_controller); 645 &autoclick_controller);
646 autoclick_controller->SetAutoclickDelay( 646 autoclick_controller->SetAutoclickDelay(
647 autoclick_delay_ms_.InMilliseconds()); 647 autoclick_delay_ms_.InMilliseconds());
648 return; 648 return;
649 } 649 }
650 650
651 ash::Shell::GetInstance()->autoclick_controller()->SetAutoclickDelay( 651 ash::Shell::GetInstance()->autoclick_controller()->SetAutoclickDelay(
652 autoclick_delay_ms_); 652 autoclick_delay_ms_);
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 content::BrowserContext* context) { 1343 content::BrowserContext* context) {
1344 keyboard_listener_extension_id_ = id; 1344 keyboard_listener_extension_id_ = id;
1345 1345
1346 extensions::ExtensionRegistry* registry = 1346 extensions::ExtensionRegistry* registry =
1347 extensions::ExtensionRegistry::Get(context); 1347 extensions::ExtensionRegistry::Get(context);
1348 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1348 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1349 extension_registry_observer_.Add(registry); 1349 extension_registry_observer_.Add(registry);
1350 } 1350 }
1351 1351
1352 } // namespace chromeos 1352 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/chrome_interface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698