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

Side by Side Diff: content/shell/shell_aura.cc

Issue 11419013: Add desktop vs. ash context to ui_controls Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 8 years, 1 month 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 "content/shell/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/aura/desktop_ui_controls.h"
9 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
10 #include "ui/aura/root_window.h" 11 #include "ui/aura/root_window.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 #include "ui/base/accessibility/accessibility_types.h" 13 #include "ui/base/accessibility/accessibility_types.h"
13 #include "ui/base/clipboard/clipboard.h" 14 #include "ui/base/clipboard/clipboard.h"
14 #include "ui/base/events/event.h" 15 #include "ui/base/events/event.h"
15 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/screen.h" 17 #include "ui/gfx/screen.h"
18 #include "ui/ui_controls/ui_controls.h"
17 #include "ui/views/controls/button/text_button.h" 19 #include "ui/views/controls/button/text_button.h"
18 #include "ui/views/controls/textfield/textfield.h" 20 #include "ui/views/controls/textfield/textfield.h"
19 #include "ui/views/controls/textfield/textfield_controller.h" 21 #include "ui/views/controls/textfield/textfield_controller.h"
20 #include "ui/views/controls/webview/webview.h" 22 #include "ui/views/controls/webview/webview.h"
21 #include "ui/views/layout/fill_layout.h" 23 #include "ui/views/layout/fill_layout.h"
22 #include "ui/views/layout/grid_layout.h" 24 #include "ui/views/layout/grid_layout.h"
23 #include "ui/views/view.h" 25 #include "ui/views/view.h"
24 #include "ui/views/test/desktop_test_views_delegate.h" 26 #include "ui/views/test/desktop_test_views_delegate.h"
25 #include "ui/views/widget/desktop_aura/desktop_screen.h" 27 #include "ui/views/widget/desktop_aura/desktop_screen.h"
26 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 chromeos::DBusThreadManager::Initialize(); 284 chromeos::DBusThreadManager::Initialize();
283 #endif 285 #endif
284 #if defined(OS_CHROMEOS) 286 #if defined(OS_CHROMEOS)
285 stacking_client_ = new content::ShellStackingClientAsh(); 287 stacking_client_ = new content::ShellStackingClientAsh();
286 gfx::Screen::SetScreenInstance( 288 gfx::Screen::SetScreenInstance(
287 gfx::SCREEN_TYPE_NATIVE, new aura::TestScreen); 289 gfx::SCREEN_TYPE_NATIVE, new aura::TestScreen);
288 #else 290 #else
289 stacking_client_ = new views::DesktopStackingClient(); 291 stacking_client_ = new views::DesktopStackingClient();
290 gfx::Screen::SetScreenInstance( 292 gfx::Screen::SetScreenInstance(
291 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); 293 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
294 // TODO(scottmg): NULL RootWindow, http://crbug.com/128578
295 ui_controls::UIControls::SetUIControlsInstance(
296 ui_controls::UI_CONTROLS_TYPE_NATIVE,
297 aura::CreateDesktopUIControls(NULL));
292 #endif 298 #endif
293 aura::client::SetStackingClient(stacking_client_); 299 aura::client::SetStackingClient(stacking_client_);
294 views_delegate_ = new ShellViewsDelegateAura(); 300 views_delegate_ = new ShellViewsDelegateAura();
295 } 301 }
296 302
297 void Shell::PlatformExit() { 303 void Shell::PlatformExit() {
298 if (stacking_client_) 304 if (stacking_client_)
299 delete stacking_client_; 305 delete stacking_client_;
300 if (views_delegate_) 306 if (views_delegate_)
301 delete views_delegate_; 307 delete views_delegate_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 360 }
355 361
356 void Shell::PlatformSetTitle(const string16& title) { 362 void Shell::PlatformSetTitle(const string16& title) {
357 ShellWindowDelegateView* delegate_view = 363 ShellWindowDelegateView* delegate_view =
358 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 364 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
359 delegate_view->SetWindowTitle(title); 365 delegate_view->SetWindowTitle(title);
360 window_widget_->UpdateWindowTitle(); 366 window_widget_->UpdateWindowTitle();
361 } 367 }
362 368
363 } // namespace content 369 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698