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

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
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_main.cc » ('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 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return false; 388 return false;
388 } 389 }
389 390
390 bool Shell::IsModalWindowOpen() const { 391 bool Shell::IsModalWindowOpen() const {
391 aura::Window* modal_container = 392 aura::Window* modal_container =
392 ash::Shell::GetInstance()->GetContainer( 393 ash::Shell::GetInstance()->GetContainer(
393 internal::kShellWindowId_AlwaysOnTopContainer); 394 internal::kShellWindowId_AlwaysOnTopContainer);
394 return !modal_container->children().empty(); 395 return !modal_container->children().empty();
395 } 396 }
396 397
398 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
399 views::Widget* widget) {
400 if (CommandLine::ForCurrentProcess()->HasSwitch(
401 switches::kAuraGoogleDialogFrames)) {
402 return new internal::DialogFrameView;
403 }
404 return NULL;
405 }
406
397 //////////////////////////////////////////////////////////////////////////////// 407 ////////////////////////////////////////////////////////////////////////////////
398 // Shell, private: 408 // Shell, private:
399 409
400 void Shell::EnableWorkspaceManager() { 410 void Shell::EnableWorkspaceManager() {
401 aura::Window* default_container = 411 aura::Window* default_container =
402 GetContainer(internal::kShellWindowId_DefaultContainer); 412 GetContainer(internal::kShellWindowId_DefaultContainer);
403 413
404 workspace_controller_.reset( 414 workspace_controller_.reset(
405 new internal::WorkspaceController(default_container)); 415 new internal::WorkspaceController(default_container));
406 workspace_controller_->SetLauncherModel(launcher_->model()); 416 workspace_controller_->SetLauncherModel(launcher_->model());
407 default_container->SetEventFilter( 417 default_container->SetEventFilter(
408 new internal::DefaultContainerEventFilter(default_container)); 418 new internal::DefaultContainerEventFilter(default_container));
409 default_container->SetLayoutManager( 419 default_container->SetLayoutManager(
410 new internal::DefaultContainerLayoutManager( 420 new internal::DefaultContainerLayoutManager(
411 workspace_controller_->workspace_manager())); 421 workspace_controller_->workspace_manager()));
412 } 422 }
413 423
414 } // namespace ash 424 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698