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

Side by Side Diff: ash/shell.cc

Issue 10386178: ash: Add a heads-up display to track touch-point states and positions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang/win-aura Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell.h ('k') | ash/touch/touch_observer_hud.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
11 #include "ash/desktop_background/desktop_background_controller.h" 11 #include "ash/desktop_background/desktop_background_controller.h"
12 #include "ash/desktop_background/desktop_background_resources.h" 12 #include "ash/desktop_background/desktop_background_resources.h"
13 #include "ash/desktop_background/desktop_background_view.h" 13 #include "ash/desktop_background/desktop_background_view.h"
14 #include "ash/drag_drop/drag_drop_controller.h" 14 #include "ash/drag_drop/drag_drop_controller.h"
15 #include "ash/focus_cycler.h" 15 #include "ash/focus_cycler.h"
16 #include "ash/launcher/launcher.h" 16 #include "ash/launcher/launcher.h"
17 #include "ash/magnifier/magnification_controller.h" 17 #include "ash/magnifier/magnification_controller.h"
18 #include "ash/monitor/monitor_controller.h" 18 #include "ash/monitor/monitor_controller.h"
19 #include "ash/monitor/multi_monitor_manager.h" 19 #include "ash/monitor/multi_monitor_manager.h"
20 #include "ash/screen_ash.h" 20 #include "ash/screen_ash.h"
21 #include "ash/shell_context_menu.h" 21 #include "ash/shell_context_menu.h"
22 #include "ash/shell_delegate.h" 22 #include "ash/shell_delegate.h"
23 #include "ash/shell_factory.h" 23 #include "ash/shell_factory.h"
24 #include "ash/shell_window_ids.h" 24 #include "ash/shell_window_ids.h"
25 #include "ash/system/bluetooth/bluetooth_observer.h" 25 #include "ash/system/bluetooth/bluetooth_observer.h"
26 #include "ash/system/network/network_observer.h" 26 #include "ash/system/network/network_observer.h"
27 #include "ash/system/tray/system_tray.h" 27 #include "ash/system/tray/system_tray.h"
28 #include "ash/system/tray/system_tray_delegate.h" 28 #include "ash/system/tray/system_tray_delegate.h"
29 #include "ash/tooltips/tooltip_controller.h" 29 #include "ash/tooltips/tooltip_controller.h"
30 #include "ash/touch/touch_observer_hud.h"
30 #include "ash/wm/activation_controller.h" 31 #include "ash/wm/activation_controller.h"
31 #include "ash/wm/app_list_controller.h" 32 #include "ash/wm/app_list_controller.h"
32 #include "ash/wm/base_layout_manager.h" 33 #include "ash/wm/base_layout_manager.h"
33 #include "ash/wm/custom_frame_view_ash.h" 34 #include "ash/wm/custom_frame_view_ash.h"
34 #include "ash/wm/dialog_frame_view.h" 35 #include "ash/wm/dialog_frame_view.h"
35 #include "ash/wm/event_client_impl.h" 36 #include "ash/wm/event_client_impl.h"
36 #include "ash/wm/key_rewriter_event_filter.h" 37 #include "ash/wm/key_rewriter_event_filter.h"
37 #include "ash/wm/panel_layout_manager.h" 38 #include "ash/wm/panel_layout_manager.h"
38 #include "ash/wm/panel_window_event_filter.h" 39 #include "ash/wm/panel_window_event_filter.h"
39 #include "ash/wm/partial_screenshot_event_filter.h" 40 #include "ash/wm/partial_screenshot_event_filter.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 547
547 Shell::~Shell() { 548 Shell::~Shell() {
548 RemoveRootWindowEventFilter(key_rewriter_filter_.get()); 549 RemoveRootWindowEventFilter(key_rewriter_filter_.get());
549 RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); 550 RemoveRootWindowEventFilter(partial_screenshot_filter_.get());
550 RemoveRootWindowEventFilter(input_method_filter_.get()); 551 RemoveRootWindowEventFilter(input_method_filter_.get());
551 RemoveRootWindowEventFilter(window_modality_controller_.get()); 552 RemoveRootWindowEventFilter(window_modality_controller_.get());
552 RemoveRootWindowEventFilter(system_gesture_filter_.get()); 553 RemoveRootWindowEventFilter(system_gesture_filter_.get());
553 #if !defined(OS_MACOSX) 554 #if !defined(OS_MACOSX)
554 RemoveRootWindowEventFilter(accelerator_filter_.get()); 555 RemoveRootWindowEventFilter(accelerator_filter_.get());
555 #endif 556 #endif
557 if (touch_observer_hud_.get())
558 RemoveRootWindowEventFilter(touch_observer_hud_.get());
556 559
557 // Close background widget now so that the focus manager of the 560 // Close background widget now so that the focus manager of the
558 // widget gets deleted in the final message loop run. 561 // widget gets deleted in the final message loop run.
559 root_window_layout_->SetBackgroundWidget(NULL); 562 root_window_layout_->SetBackgroundWidget(NULL);
560 563
561 // TooltipController is deleted with the Shell so removing its references. 564 // TooltipController is deleted with the Shell so removing its references.
562 RemoveRootWindowEventFilter(tooltip_controller_.get()); 565 RemoveRootWindowEventFilter(tooltip_controller_.get());
563 aura::client::SetTooltipClient(GetRootWindow(), NULL); 566 aura::client::SetTooltipClient(GetRootWindow(), NULL);
564 567
565 // Make sure we delete WorkspaceController before launcher is 568 // Make sure we delete WorkspaceController before launcher is
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 AddRootWindowEventFilter(system_gesture_filter_.get()); 680 AddRootWindowEventFilter(system_gesture_filter_.get());
678 681
679 root_window->SetCursor(ui::kCursorPointer); 682 root_window->SetCursor(ui::kCursorPointer);
680 if (initially_hide_cursor_) 683 if (initially_hide_cursor_)
681 root_window->ShowCursor(false); 684 root_window->ShowCursor(false);
682 685
683 activation_controller_.reset(new internal::ActivationController); 686 activation_controller_.reset(new internal::ActivationController);
684 687
685 CreateSpecialContainers(root_window); 688 CreateSpecialContainers(root_window);
686 689
690 CommandLine* command_line = CommandLine::ForCurrentProcess();
691
692 if (command_line->HasSwitch(switches::kAshTouchHud)) {
693 touch_observer_hud_.reset(new internal::TouchObserverHUD);
694 AddRootWindowEventFilter(touch_observer_hud_.get());
695 }
696
687 stacking_controller_.reset(new internal::StackingController); 697 stacking_controller_.reset(new internal::StackingController);
688 698
689 root_window_layout_ = new internal::RootWindowLayoutManager(root_window); 699 root_window_layout_ = new internal::RootWindowLayoutManager(root_window);
690 root_window->SetLayoutManager(root_window_layout_); 700 root_window->SetLayoutManager(root_window_layout_);
691 701
692 event_client_.reset(new internal::EventClientImpl(root_window)); 702 event_client_.reset(new internal::EventClientImpl(root_window));
693 703
694 CommandLine* command_line = CommandLine::ForCurrentProcess();
695
696 tray_.reset(new SystemTray()); 704 tray_.reset(new SystemTray());
697 if (delegate_.get()) 705 if (delegate_.get())
698 tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get())); 706 tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get()));
699 if (!tray_delegate_.get()) 707 if (!tray_delegate_.get())
700 tray_delegate_.reset(new DummySystemTrayDelegate()); 708 tray_delegate_.reset(new DummySystemTrayDelegate());
701 tray_->CreateItems(); 709 tray_->CreateItems();
702 tray_->CreateWidget(); 710 tray_->CreateWidget();
703 711
704 // This controller needs to be set before SetupManagedWindowMode. 712 // This controller needs to be set before SetupManagedWindowMode.
705 desktop_background_controller_.reset(new DesktopBackgroundController); 713 desktop_background_controller_.reset(new DesktopBackgroundController);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 panel_container->SetLayoutManager(panel_layout_manager_); 948 panel_container->SetLayoutManager(panel_layout_manager_);
941 } 949 }
942 } 950 }
943 951
944 void Shell::DisableWorkspaceGridLayout() { 952 void Shell::DisableWorkspaceGridLayout() {
945 if (workspace_controller_.get()) 953 if (workspace_controller_.get())
946 workspace_controller_->workspace_manager()->set_grid_size(0); 954 workspace_controller_->workspace_manager()->set_grid_size(0);
947 } 955 }
948 956
949 } // namespace ash 957 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/touch/touch_observer_hud.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698