OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/browser/web_contents_view.h" | 10 #include "content/public/browser/web_contents_view.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 MinimalShell* Shell::minimal_shell_ = NULL; | 281 MinimalShell* Shell::minimal_shell_ = NULL; |
282 #endif | 282 #endif |
283 views::ViewsDelegate* Shell::views_delegate_ = NULL; | 283 views::ViewsDelegate* Shell::views_delegate_ = NULL; |
284 | 284 |
285 // static | 285 // static |
286 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { | 286 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { |
287 #if defined(OS_WIN) | 287 #if defined(OS_WIN) |
288 _setmode(_fileno(stdout), _O_BINARY); | 288 _setmode(_fileno(stdout), _O_BINARY); |
289 _setmode(_fileno(stderr), _O_BINARY); | 289 _setmode(_fileno(stderr), _O_BINARY); |
290 #endif | 290 #endif |
291 // Env creates the compositor which will be needed when creating the root | |
292 // window. | |
293 aura::Env::GetInstance(); | |
Ben Goodger (Google)
2013/09/06 17:08:38
Perhaps we should have an explicit CreateInstance
| |
291 #if defined(OS_CHROMEOS) | 294 #if defined(OS_CHROMEOS) |
292 chromeos::DBusThreadManager::Initialize(); | 295 chromeos::DBusThreadManager::Initialize(); |
293 gfx::Screen::SetScreenInstance( | 296 gfx::Screen::SetScreenInstance( |
294 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); | 297 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); |
295 minimal_shell_ = new content::MinimalShell(default_window_size); | 298 minimal_shell_ = new content::MinimalShell(default_window_size); |
296 #else | 299 #else |
297 gfx::Screen::SetScreenInstance( | 300 gfx::Screen::SetScreenInstance( |
298 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); | 301 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); |
299 #endif | 302 #endif |
300 views_delegate_ = new ShellViewsDelegateAura(); | 303 views_delegate_ = new ShellViewsDelegateAura(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 } | 382 } |
380 | 383 |
381 void Shell::PlatformSetTitle(const string16& title) { | 384 void Shell::PlatformSetTitle(const string16& title) { |
382 ShellWindowDelegateView* delegate_view = | 385 ShellWindowDelegateView* delegate_view = |
383 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 386 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
384 delegate_view->SetWindowTitle(title); | 387 delegate_view->SetWindowTitle(title); |
385 window_widget_->UpdateWindowTitle(); | 388 window_widget_->UpdateWindowTitle(); |
386 } | 389 } |
387 | 390 |
388 } // namespace content | 391 } // namespace content |
OLD | NEW |