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

Side by Side Diff: content/shell/browser/shell_views.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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
OLDNEW
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 views::ViewsDelegate* Shell::views_delegate_ = NULL; 390 views::ViewsDelegate* Shell::views_delegate_ = NULL;
391 391
392 // static 392 // static
393 void Shell::PlatformInitialize(const gfx::Size& default_window_size) { 393 void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
394 #if defined(OS_WIN) 394 #if defined(OS_WIN)
395 _setmode(_fileno(stdout), _O_BINARY); 395 _setmode(_fileno(stdout), _O_BINARY);
396 _setmode(_fileno(stderr), _O_BINARY); 396 _setmode(_fileno(stderr), _O_BINARY);
397 #endif 397 #endif
398 #if defined(OS_CHROMEOS) 398 #if defined(OS_CHROMEOS)
399 test_screen_ = aura::TestScreen::Create(gfx::Size()); 399 test_screen_ = aura::TestScreen::Create(gfx::Size());
400 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_); 400 gfx::Screen::SetScreenInstance(test_screen_);
401 wm_test_helper_ = new wm::WMTestHelper(default_window_size, 401 wm_test_helper_ = new wm::WMTestHelper(default_window_size,
402 GetContextFactory()); 402 GetContextFactory());
403 #else 403 #else
404 gfx::Screen::SetScreenInstance( 404 gfx::Screen::SetScreenInstance(views::CreateDesktopScreen());
405 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
406 #endif 405 #endif
407 views_delegate_ = new views::DesktopTestViewsDelegate(); 406 views_delegate_ = new views::DesktopTestViewsDelegate();
408 } 407 }
409 408
410 void Shell::PlatformExit() { 409 void Shell::PlatformExit() {
411 #if defined(OS_CHROMEOS) 410 #if defined(OS_CHROMEOS)
412 delete wm_test_helper_; 411 delete wm_test_helper_;
413 wm_test_helper_ = NULL; 412 wm_test_helper_ = NULL;
414 413
415 delete test_screen_; 414 delete test_screen_;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 const content::ContextMenuParams& params) { 527 const content::ContextMenuParams& params) {
529 if (headless_) 528 if (headless_)
530 return true; 529 return true;
531 ShellWindowDelegateView* delegate_view = 530 ShellWindowDelegateView* delegate_view =
532 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 531 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
533 delegate_view->ShowWebViewContextMenu(params); 532 delegate_view->ShowWebViewContextMenu(params);
534 return true; 533 return true;
535 } 534 }
536 535
537 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_aura.cc ('k') | extensions/browser/api/capture_web_contents_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698