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

Side by Side Diff: ash/wm/workspace_controller.cc

Issue 9159048: Fix compile with Aura/Mac ash_shell and workspace controller (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes reverse iterators for compatibility with 10.5 SDK Created 8 years, 10 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/wm/workspace_controller.h ('k') | ui/aura/root_window.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/wm/workspace_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "ash/wm/workspace/workspace_event_filter.h" 9 #include "ash/wm/workspace/workspace_event_filter.h"
10 #include "ash/wm/workspace/workspace_layout_manager.h" 10 #include "ash/wm/workspace/workspace_layout_manager.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 aura::RootWindow::GetInstance()->RemoveObserver(this); 46 aura::RootWindow::GetInstance()->RemoveObserver(this);
47 aura::RootWindow::GetInstance()->RemoveRootWindowObserver(this); 47 aura::RootWindow::GetInstance()->RemoveRootWindowObserver(this);
48 } 48 }
49 49
50 void WorkspaceController::ToggleOverview() { 50 void WorkspaceController::ToggleOverview() {
51 workspace_manager_->SetOverview(!workspace_manager_->is_overview()); 51 workspace_manager_->SetOverview(!workspace_manager_->is_overview());
52 } 52 }
53 53
54 void WorkspaceController::ShowMenu(views::Widget* widget, 54 void WorkspaceController::ShowMenu(views::Widget* widget,
55 const gfx::Point& location) { 55 const gfx::Point& location) {
56 #if !defined(OS_MACOSX)
56 ui::SimpleMenuModel menu_model(this); 57 ui::SimpleMenuModel menu_model(this);
57 // This is just for testing and will be ripped out before we ship, so none of 58 // This is just for testing and will be ripped out before we ship, so none of
58 // the strings are localized. 59 // the strings are localized.
59 menu_model.AddCheckItem(MENU_SNAP_TO_GRID, 60 menu_model.AddCheckItem(MENU_SNAP_TO_GRID,
60 ASCIIToUTF16("Snap to grid")); 61 ASCIIToUTF16("Snap to grid"));
61 menu_model.AddCheckItem(MENU_OPEN_MAXIMIZED, 62 menu_model.AddCheckItem(MENU_OPEN_MAXIMIZED,
62 ASCIIToUTF16("Maximize new windows")); 63 ASCIIToUTF16("Maximize new windows"));
63 views::MenuModelAdapter menu_model_adapter(&menu_model); 64 views::MenuModelAdapter menu_model_adapter(&menu_model);
64 menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu())); 65 menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu()));
65 if (menu_runner_->RunMenuAt( 66 if (menu_runner_->RunMenuAt(
66 widget, NULL, gfx::Rect(location, gfx::Size()), 67 widget, NULL, gfx::Rect(location, gfx::Size()),
67 views::MenuItemView::TOPRIGHT, views::MenuRunner::HAS_MNEMONICS) == 68 views::MenuItemView::TOPRIGHT, views::MenuRunner::HAS_MNEMONICS) ==
68 views::MenuRunner::MENU_DELETED) 69 views::MenuRunner::MENU_DELETED)
69 return; 70 return;
71 #endif // !defined(OS_MACOSX)
70 } 72 }
71 73
72 void WorkspaceController::OnRootWindowResized(const gfx::Size& new_size) { 74 void WorkspaceController::OnRootWindowResized(const gfx::Size& new_size) {
73 workspace_manager_->SetWorkspaceSize(new_size); 75 workspace_manager_->SetWorkspaceSize(new_size);
74 } 76 }
75 77
76 void WorkspaceController::OnWindowPropertyChanged(aura::Window* window, 78 void WorkspaceController::OnWindowPropertyChanged(aura::Window* window,
77 const char* key, 79 const char* key,
78 void* old) { 80 void* old) {
79 if (key == aura::client::kRootWindowActiveWindow) 81 if (key == aura::client::kRootWindowActiveWindow)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 135 }
134 136
135 bool WorkspaceController::GetAcceleratorForCommandId( 137 bool WorkspaceController::GetAcceleratorForCommandId(
136 int command_id, 138 int command_id,
137 ui::Accelerator* accelerator) { 139 ui::Accelerator* accelerator) {
138 return false; 140 return false;
139 } 141 }
140 142
141 } // namespace internal 143 } // namespace internal
142 } // namespace ash 144 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller.h ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698