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

Side by Side Diff: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_launcher.h

Issue 2496903003: arc: Add Arc Kiosk app service and ability to launch kiosk apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy_comp_parse
Patch Set: Remove unnecessary null check. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_LAUNCHER_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_LAUNCHER_H_
7
8 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
9 #include "ui/aura/env_observer.h"
10 #include "ui/aura/window.h"
11 #include "ui/aura/window_observer.h"
12
13 namespace chromeos {
14
15 // Starts Android app in kiosk mode.
16 // Keeps track of start progress and pins app window
17 // when it's finally opened.
18 class ArcKioskAppLauncher : public ArcAppListPrefs::Observer,
19 public aura::EnvObserver,
20 public aura::WindowObserver {
21 public:
22 ArcKioskAppLauncher(content::BrowserContext* context,
23 const std::string& app_id);
24
25 ~ArcKioskAppLauncher() override;
26
27 // ArcAppListPrefs::Observer overrides.
28 void OnTaskCreated(int32_t task_id,
29 const std::string& package_name,
30 const std::string& activity) override;
31
32 // aura::EnvObserver overrides.
33 void OnWindowInitialized(aura::Window* window) override;
34
35 // aura::WindowObserver overrides.
36 void OnWindowPropertyChanged(aura::Window* window,
37 const void* key,
38 intptr_t old) override;
39 void OnWindowDestroying(aura::Window* window) override;
40
41 private:
42 bool CheckWindow(aura::Window* const window);
Nikita (slow) 2016/11/16 15:33:28 nit: method comment
Sergey Poromov 2016/11/16 15:54:09 Done.
43 void StopObserving();
44
45 std::string app_id_;
46 ArcAppListPrefs* prefs_;
47 int task_id_ = -1;
48 std::set<aura::Window*> windows_;
49
50 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppLauncher);
51 };
52
53 } // namespace chromeos
54
55 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_LAUNCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698