Chromium Code Reviews| 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/context_factory.h" | 9 #include "content/public/browser/context_factory.h" |
| 10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 views::ViewsDelegate* Shell::views_delegate_ = NULL; | 416 views::ViewsDelegate* Shell::views_delegate_ = NULL; |
| 417 | 417 |
| 418 // static | 418 // static |
| 419 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { | 419 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { |
| 420 #if defined(OS_WIN) | 420 #if defined(OS_WIN) |
| 421 _setmode(_fileno(stdout), _O_BINARY); | 421 _setmode(_fileno(stdout), _O_BINARY); |
| 422 _setmode(_fileno(stderr), _O_BINARY); | 422 _setmode(_fileno(stderr), _O_BINARY); |
| 423 #endif | 423 #endif |
| 424 #if defined(OS_CHROMEOS) | 424 #if defined(OS_CHROMEOS) |
| 425 chromeos::DBusThreadManager::Initialize(); | 425 chromeos::DBusThreadManager::Initialize(); |
| 426 gfx::Screen::SetScreenInstance( | 426 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
| 427 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); | 427 aura::TestScreen::Create(gfx::Size())); |
|
sky
2014/06/19 14:51:08
Does this leak?
sadrul
2014/06/19 16:01:23
Looks like it does (although I wonder why the memo
| |
| 428 wm_test_helper_ = new wm::WMTestHelper(default_window_size, | 428 wm_test_helper_ = new wm::WMTestHelper(default_window_size, |
| 429 GetContextFactory()); | 429 GetContextFactory()); |
| 430 #else | 430 #else |
| 431 gfx::Screen::SetScreenInstance( | 431 gfx::Screen::SetScreenInstance( |
| 432 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); | 432 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); |
| 433 #endif | 433 #endif |
| 434 views_delegate_ = new ShellViewsDelegateAura(); | 434 views_delegate_ = new ShellViewsDelegateAura(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 void Shell::PlatformExit() { | 437 void Shell::PlatformExit() { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 | 563 |
| 564 void Shell::PlatformWebContentsFocused(WebContents* contents) { | 564 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
| 565 if (headless_) | 565 if (headless_) |
| 566 return; | 566 return; |
| 567 ShellWindowDelegateView* delegate_view = | 567 ShellWindowDelegateView* delegate_view = |
| 568 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 568 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
| 569 delegate_view->OnWebContentsFocused(contents); | 569 delegate_view->OnWebContentsFocused(contents); |
| 570 } | 570 } |
| 571 | 571 |
| 572 } // namespace content | 572 } // namespace content |
| OLD | NEW |