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

Side by Side Diff: ash/shell.cc

Issue 9166014: Allow a Views client to provide a default frameview for window widgets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
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 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accelerators/accelerator_filter.h" 10 #include "ash/accelerators/accelerator_filter.h"
11 #include "ash/app_list/app_list.h" 11 #include "ash/app_list/app_list.h"
12 #include "ash/ash_switches.h" 12 #include "ash/ash_switches.h"
13 #include "ash/drag_drop/drag_drop_controller.h" 13 #include "ash/drag_drop/drag_drop_controller.h"
14 #include "ash/ime/input_method_event_filter.h" 14 #include "ash/ime/input_method_event_filter.h"
15 #include "ash/launcher/launcher.h" 15 #include "ash/launcher/launcher.h"
16 #include "ash/shell_delegate.h" 16 #include "ash/shell_delegate.h"
17 #include "ash/shell_factory.h" 17 #include "ash/shell_factory.h"
18 #include "ash/shell_window_ids.h" 18 #include "ash/shell_window_ids.h"
19 #include "ash/tooltips/tooltip_controller.h" 19 #include "ash/tooltips/tooltip_controller.h"
20 #include "ash/wm/activation_controller.h" 20 #include "ash/wm/activation_controller.h"
21 #include "ash/wm/compact_layout_manager.h" 21 #include "ash/wm/compact_layout_manager.h"
22 #include "ash/wm/compact_status_area_layout_manager.h" 22 #include "ash/wm/compact_status_area_layout_manager.h"
23 #include "ash/wm/default_container_event_filter.h" 23 #include "ash/wm/default_container_event_filter.h"
24 #include "ash/wm/default_container_layout_manager.h" 24 #include "ash/wm/default_container_layout_manager.h"
25 #include "ash/wm/dialog_frame_view.h"
25 #include "ash/wm/modal_container_layout_manager.h" 26 #include "ash/wm/modal_container_layout_manager.h"
26 #include "ash/wm/power_button_controller.h" 27 #include "ash/wm/power_button_controller.h"
27 #include "ash/wm/root_window_event_filter.h" 28 #include "ash/wm/root_window_event_filter.h"
28 #include "ash/wm/root_window_layout_manager.h" 29 #include "ash/wm/root_window_layout_manager.h"
29 #include "ash/wm/shadow_controller.h" 30 #include "ash/wm/shadow_controller.h"
30 #include "ash/wm/shelf_layout_manager.h" 31 #include "ash/wm/shelf_layout_manager.h"
31 #include "ash/wm/stacking_controller.h" 32 #include "ash/wm/stacking_controller.h"
32 #include "ash/wm/status_area_layout_manager.h" 33 #include "ash/wm/status_area_layout_manager.h"
33 #include "ash/wm/toplevel_layout_manager.h" 34 #include "ash/wm/toplevel_layout_manager.h"
34 #include "ash/wm/toplevel_window_event_filter.h" 35 #include "ash/wm/toplevel_window_event_filter.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 lock_screen_container->children(); 377 lock_screen_container->children();
377 aura::Window::Windows::const_iterator lock_screen_it = 378 aura::Window::Windows::const_iterator lock_screen_it =
378 std::find_if(lock_screen_windows.begin(), lock_screen_windows.end(), 379 std::find_if(lock_screen_windows.begin(), lock_screen_windows.end(),
379 std::mem_fun(&aura::Window::IsVisible)); 380 std::mem_fun(&aura::Window::IsVisible));
380 if (lock_screen_it != lock_screen_windows.end()) 381 if (lock_screen_it != lock_screen_windows.end())
381 return true; 382 return true;
382 383
383 return false; 384 return false;
384 } 385 }
385 386
387 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
388 views::Widget* widget) {
389 if (CommandLine::ForCurrentProcess()->HasSwitch(
390 switches::kAuraKennedyDialogFrames)) {
391 return new internal::DialogFrameView;
392 }
393 return NULL;
394 }
395
386 //////////////////////////////////////////////////////////////////////////////// 396 ////////////////////////////////////////////////////////////////////////////////
387 // Shell, private: 397 // Shell, private:
388 398
389 void Shell::EnableWorkspaceManager() { 399 void Shell::EnableWorkspaceManager() {
390 aura::Window* default_container = 400 aura::Window* default_container =
391 GetContainer(internal::kShellWindowId_DefaultContainer); 401 GetContainer(internal::kShellWindowId_DefaultContainer);
392 402
393 workspace_controller_.reset( 403 workspace_controller_.reset(
394 new internal::WorkspaceController(default_container)); 404 new internal::WorkspaceController(default_container));
395 workspace_controller_->SetLauncherModel(launcher_->model()); 405 workspace_controller_->SetLauncherModel(launcher_->model());
396 default_container->SetEventFilter( 406 default_container->SetEventFilter(
397 new internal::DefaultContainerEventFilter(default_container)); 407 new internal::DefaultContainerEventFilter(default_container));
398 default_container->SetLayoutManager( 408 default_container->SetLayoutManager(
399 new internal::DefaultContainerLayoutManager( 409 new internal::DefaultContainerLayoutManager(
400 workspace_controller_->workspace_manager())); 410 workspace_controller_->workspace_manager()));
401 } 411 }
402 412
403 } // namespace ash 413 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698