Merge from Chromium at DEPS revision 237746
This commit was generated by merge_to_master.py.
Change-Id: I8997af4cddfeb09a7c26f7e8e672c712cab461ea
diff --git a/ash/shell.h b/ash/shell.h
index fa54faa..1c4e779 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -9,6 +9,7 @@
#include <vector>
#include "ash/ash_export.h"
+#include "ash/periodic_metrics_recorder.h"
#include "ash/shelf/shelf_types.h"
#include "ash/system/user/login_status.h"
#include "ash/wm/system_modal_container_event_filter_delegate.h"
@@ -19,6 +20,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "ui/aura/client/activation_change_observer.h"
+#include "ui/aura/window.h"
#include "ui/base/ui_base_types.h"
#include "ui/events/event_target.h"
#include "ui/gfx/insets.h"
@@ -44,9 +46,6 @@
namespace chromeos {
class OutputConfigurator;
}
-namespace content {
-class BrowserContext;
-}
namespace gfx {
class ImageSkia;
@@ -89,7 +88,6 @@
class LauncherDelegate;
class LauncherItemDelegate;
class LauncherItemDelegateManager;
-class LauncherModel;
class LockStateController;
class MagnificationController;
class MediaDelegate;
@@ -101,8 +99,10 @@
class RootWindowHostFactory;
class ScreenAsh;
class SessionStateDelegate;
+class ShelfModel;
class ShellDelegate;
class ShellObserver;
+class StickyKeys;
class SystemTray;
class SystemTrayDelegate;
class SystemTrayNotifier;
@@ -164,7 +164,6 @@
public ui::EventTarget,
public aura::client::ActivationChangeObserver {
public:
- typedef std::vector<aura::RootWindow*> RootWindowList;
typedef std::vector<internal::RootWindowController*> RootWindowControllerList;
enum Direction {
@@ -208,7 +207,7 @@
static gfx::Screen* GetScreen();
// Returns all root windows.
- static RootWindowList GetAllRootWindows();
+ static aura::Window::Windows GetAllRootWindows();
static aura::Window* GetContainer(aura::Window* root_window,
int container_id);
@@ -271,6 +270,9 @@
// Called when the user logs in.
void OnLoginStateChanged(user::LoginStatus status);
+ // Called after the logged-in user's profile is ready.
+ void OnLoginUserProfilePrepared();
+
// Called when the login status changes.
// TODO(oshima): Investigate if we can merge this and |OnLoginStateChanged|.
void UpdateAfterLoginStatusChange(user::LoginStatus status);
@@ -285,6 +287,10 @@
// Initializes |launcher_|. Does nothing if it's already initialized.
void CreateLauncher();
+ // Creates virtual keyboard. Deletes the old virtual keyboard if it's already
+ // exist.
+ void CreateKeyboard();
+
// Show shelf view if it was created hidden (before session has started).
void ShowLauncher();
@@ -472,11 +478,6 @@
return shadow_controller_.get();
}
- content::BrowserContext* browser_context() { return browser_context_; }
- void set_browser_context(content::BrowserContext* browser_context) {
- browser_context_ = browser_context;
- }
-
// Starts the animation that occurs on first login.
void DoInitialWorkspaceAnimation();
@@ -502,8 +503,8 @@
return root_window_host_factory_.get();
}
- LauncherModel* launcher_model() {
- return launcher_model_.get();
+ ShelfModel* shelf_model() {
+ return shelf_model_.get();
}
WindowPositioner* window_positioner() {
@@ -523,6 +524,10 @@
// Creates instance of FirstRunHelper. Caller is responsible for deleting
// returned object.
ash::FirstRunHelper* CreateFirstRunHelper();
+
+ StickyKeys* sticky_keys() {
+ return sticky_keys_.get();
+ }
#endif // defined(OS_CHROMEOS)
private:
@@ -542,11 +547,11 @@
void Init();
- // Initializes virtual keyboard controller and attaches it to |root|.
- void InitKeyboard(internal::RootWindowController* root);
+ // Initializes virtual keyboard controller.
+ void InitKeyboard();
// Initializes the root window so that it can host browser windows.
- void InitRootWindow(aura::RootWindow* root_window);
+ void InitRootWindow(aura::Window* root_window);
// ash::internal::SystemModalContainerEventFilterDelegate overrides:
virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE;
@@ -580,6 +585,7 @@
std::vector<WindowAndBoundsPair> to_restore_;
+ scoped_ptr<PeriodicMetricsRecorder> periodic_metrics_recorder_;
scoped_ptr<keyboard::KeyboardController> keyboard_controller_;
scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
scoped_ptr<AcceleratorController> accelerator_controller_;
@@ -595,8 +601,8 @@
scoped_ptr<LauncherDelegate> launcher_delegate_;
scoped_ptr<LauncherItemDelegateManager> launcher_item_delegate_manager_;
- scoped_ptr<LauncherModel> launcher_model_;
- scoped_ptr<ash::WindowPositioner> window_positioner_;
+ scoped_ptr<ShelfModel> shelf_model_;
+ scoped_ptr<WindowPositioner> window_positioner_;
scoped_ptr<internal::AppListController> app_list_controller_;
@@ -662,6 +668,7 @@
scoped_ptr<internal::PowerEventObserver> power_event_observer_;
scoped_ptr<internal::UserActivityNotifier> user_activity_notifier_;
scoped_ptr<internal::VideoActivityNotifier> video_activity_notifier_;
+ scoped_ptr<StickyKeys> sticky_keys_;
#if defined(USE_X11)
// Controls video output device state.
scoped_ptr<chromeos::OutputConfigurator> output_configurator_;
@@ -684,9 +691,6 @@
ObserverList<ShellObserver> observers_;
- // Used by ash/shell.
- content::BrowserContext* browser_context_;
-
// For testing only: simulate that a modal window is open
bool simulate_modal_window_open_for_testing_;