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

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

Issue 1636533003: Remove dead code: ShellViewsDelegateAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #endif 47 #endif
48 48
49 #if defined(OS_WIN) 49 #if defined(OS_WIN)
50 #include <fcntl.h> 50 #include <fcntl.h>
51 #include <io.h> 51 #include <io.h>
52 #endif 52 #endif
53 53
54 namespace content { 54 namespace content {
55 55
56 namespace { 56 namespace {
57 // ViewDelegate implementation for aura content shell
58 class ShellViewsDelegateAura : public views::DesktopTestViewsDelegate {
59 public:
60 ShellViewsDelegateAura() : use_transparent_windows_(false) {
61 }
62
63 ~ShellViewsDelegateAura() override {}
64
65 void SetUseTransparentWindows(bool transparent) {
66 use_transparent_windows_ = transparent;
67 }
68
69 private:
70 bool use_transparent_windows_;
71
72 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegateAura);
73 };
74 57
75 // Model for the "Debug" menu 58 // Model for the "Debug" menu
76 class ContextMenuModel : public ui::SimpleMenuModel, 59 class ContextMenuModel : public ui::SimpleMenuModel,
77 public ui::SimpleMenuModel::Delegate { 60 public ui::SimpleMenuModel::Delegate {
78 public: 61 public:
79 explicit ContextMenuModel( 62 explicit ContextMenuModel(
80 Shell* shell, const content::ContextMenuParams& params) 63 Shell* shell, const content::ContextMenuParams& params)
81 : ui::SimpleMenuModel(this), 64 : ui::SimpleMenuModel(this),
82 shell_(shell), 65 shell_(shell),
83 params_(params) { 66 params_(params) {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 #endif 397 #endif
415 #if defined(OS_CHROMEOS) 398 #if defined(OS_CHROMEOS)
416 test_screen_ = aura::TestScreen::Create(gfx::Size()); 399 test_screen_ = aura::TestScreen::Create(gfx::Size());
417 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_); 400 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_);
418 wm_test_helper_ = new wm::WMTestHelper(default_window_size, 401 wm_test_helper_ = new wm::WMTestHelper(default_window_size,
419 GetContextFactory()); 402 GetContextFactory());
420 #else 403 #else
421 gfx::Screen::SetScreenInstance( 404 gfx::Screen::SetScreenInstance(
422 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); 405 gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
423 #endif 406 #endif
424 views_delegate_ = new ShellViewsDelegateAura(); 407 views_delegate_ = new views::DesktopTestViewsDelegate();
425 } 408 }
426 409
427 void Shell::PlatformExit() { 410 void Shell::PlatformExit() {
428 #if defined(OS_CHROMEOS) 411 #if defined(OS_CHROMEOS)
429 delete wm_test_helper_; 412 delete wm_test_helper_;
430 wm_test_helper_ = NULL; 413 wm_test_helper_ = NULL;
431 414
432 delete test_screen_; 415 delete test_screen_;
433 test_screen_ = NULL; 416 test_screen_ = NULL;
434 #endif 417 #endif
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 const content::ContextMenuParams& params) { 528 const content::ContextMenuParams& params) {
546 if (headless_) 529 if (headless_)
547 return true; 530 return true;
548 ShellWindowDelegateView* delegate_view = 531 ShellWindowDelegateView* delegate_view =
549 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 532 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
550 delegate_view->ShowWebViewContextMenu(params); 533 delegate_view->ShowWebViewContextMenu(params);
551 return true; 534 return true;
552 } 535 }
553 536
554 } // namespace content 537 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698