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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 views::ViewsDelegate* Shell::views_delegate_ = NULL; | 407 views::ViewsDelegate* Shell::views_delegate_ = NULL; |
408 | 408 |
409 // static | 409 // static |
410 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { | 410 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { |
411 #if defined(OS_WIN) | 411 #if defined(OS_WIN) |
412 _setmode(_fileno(stdout), _O_BINARY); | 412 _setmode(_fileno(stdout), _O_BINARY); |
413 _setmode(_fileno(stderr), _O_BINARY); | 413 _setmode(_fileno(stderr), _O_BINARY); |
414 #endif | 414 #endif |
415 #if defined(OS_CHROMEOS) | 415 #if defined(OS_CHROMEOS) |
416 test_screen_ = aura::TestScreen::Create(gfx::Size()); | 416 test_screen_ = aura::TestScreen::Create(gfx::Size()); |
417 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_); | 417 gfx::Screen::SetScreenInstance(test_screen_); |
418 wm_test_helper_ = new wm::WMTestHelper(default_window_size, | 418 wm_test_helper_ = new wm::WMTestHelper(default_window_size, |
419 GetContextFactory()); | 419 GetContextFactory()); |
420 #else | 420 #else |
421 gfx::Screen::SetScreenInstance( | 421 gfx::Screen::SetScreenInstance(views::CreateDesktopScreen()); |
422 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); | |
423 #endif | 422 #endif |
424 views_delegate_ = new ShellViewsDelegateAura(); | 423 views_delegate_ = new ShellViewsDelegateAura(); |
425 } | 424 } |
426 | 425 |
427 void Shell::PlatformExit() { | 426 void Shell::PlatformExit() { |
428 #if defined(OS_CHROMEOS) | 427 #if defined(OS_CHROMEOS) |
429 delete wm_test_helper_; | 428 delete wm_test_helper_; |
430 wm_test_helper_ = NULL; | 429 wm_test_helper_ = NULL; |
431 | 430 |
432 delete test_screen_; | 431 delete test_screen_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 const content::ContextMenuParams& params) { | 544 const content::ContextMenuParams& params) { |
546 if (headless_) | 545 if (headless_) |
547 return true; | 546 return true; |
548 ShellWindowDelegateView* delegate_view = | 547 ShellWindowDelegateView* delegate_view = |
549 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 548 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
550 delegate_view->ShowWebViewContextMenu(params); | 549 delegate_view->ShowWebViewContextMenu(params); |
551 return true; | 550 return true; |
552 } | 551 } |
553 | 552 |
554 } // namespace content | 553 } // namespace content |
OLD | NEW |