| Index: chrome/browser/chromeos/app_mode/app_session_lifetime.cc
|
| diff --git a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
|
| index d3c1cb25cfa419dd3170cde9fdfe2d1f2efb3dae..7c3466f55de7771dced92834c5b3bc8b3ab713a9 100644
|
| --- a/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
|
| +++ b/chrome/browser/chromeos/app_mode/app_session_lifetime.cc
|
| @@ -4,8 +4,8 @@
|
|
|
| #include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
|
|
|
| -#include "apps/shell_window.h"
|
| -#include "apps/shell_window_registry.h"
|
| +#include "apps/app_window.h"
|
| +#include "apps/app_window_registry.h"
|
| #include "ash/wm/window_state.h"
|
| #include "base/basictypes.h"
|
| #include "base/bind.h"
|
| @@ -26,7 +26,7 @@
|
| #include "chrome/common/pref_names.h"
|
| #include "content/public/browser/web_contents.h"
|
|
|
| -using apps::ShellWindowRegistry;
|
| +using apps::AppWindowRegistry;
|
|
|
| namespace chromeos {
|
|
|
| @@ -36,37 +36,36 @@ namespace {
|
| // last app window is closed. It also initializes the kiosk app window so
|
| // that it receives all function keys as a temp solution before underlying
|
| // http:://crbug.com/166928 is fixed..
|
| -class AppWindowHandler : public ShellWindowRegistry::Observer {
|
| +class AppWindowHandler : public AppWindowRegistry::Observer {
|
| public:
|
| AppWindowHandler() : window_registry_(NULL) {}
|
| virtual ~AppWindowHandler() {}
|
|
|
| void Init(Profile* profile) {
|
| DCHECK(!window_registry_);
|
| - window_registry_ = ShellWindowRegistry::Get(profile);
|
| + window_registry_ = AppWindowRegistry::Get(profile);
|
| if (window_registry_)
|
| window_registry_->AddObserver(this);
|
| }
|
|
|
| private:
|
| - // apps::ShellWindowRegistry::Observer overrides:
|
| - virtual void OnShellWindowAdded(apps::ShellWindow* shell_window) OVERRIDE {
|
| + // apps::AppWindowRegistry::Observer overrides:
|
| + virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE {
|
| // Set flags to allow kiosk app to receive all function keys.
|
| // TODO(xiyuan): Remove this after http:://crbug.com/166928.
|
| ash::wm::WindowState* window_state =
|
| - ash::wm::GetWindowState(shell_window->GetNativeWindow());
|
| + ash::wm::GetWindowState(app_window->GetNativeWindow());
|
| window_state->set_top_row_keys_are_function_keys(true);
|
| }
|
| - virtual void OnShellWindowIconChanged(apps::ShellWindow* shell_window)
|
| - OVERRIDE {}
|
| - virtual void OnShellWindowRemoved(apps::ShellWindow* shell_window) OVERRIDE {
|
| - if (window_registry_->shell_windows().empty()) {
|
| + virtual void OnAppWindowIconChanged(apps::AppWindow* app_window) OVERRIDE {}
|
| + virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE {
|
| + if (window_registry_->app_windows().empty()) {
|
| chrome::AttemptUserExit();
|
| window_registry_->RemoveObserver(this);
|
| }
|
| }
|
|
|
| - apps::ShellWindowRegistry* window_registry_;
|
| + apps::AppWindowRegistry* window_registry_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AppWindowHandler);
|
| };
|
|
|