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

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

Issue 282133005: Removes unnecessary views::Widget::InitParams::top_level (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 "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/render_widget_host_view.h" 9 #include "content/public/browser/render_widget_host_view.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 #if defined(OS_CHROMEOS) 489 #if defined(OS_CHROMEOS)
490 window_widget_ = views::Widget::CreateWindowWithContextAndBounds( 490 window_widget_ = views::Widget::CreateWindowWithContextAndBounds(
491 new ShellWindowDelegateView(this), 491 new ShellWindowDelegateView(this),
492 wm_test_helper_->GetDefaultParent(NULL, NULL, gfx::Rect()), 492 wm_test_helper_->GetDefaultParent(NULL, NULL, gfx::Rect()),
493 gfx::Rect(0, 0, width, height)); 493 gfx::Rect(0, 0, width, height));
494 #else 494 #else
495 window_widget_ = new views::Widget; 495 window_widget_ = new views::Widget;
496 views::Widget::InitParams params; 496 views::Widget::InitParams params;
497 params.bounds = gfx::Rect(0, 0, width, height); 497 params.bounds = gfx::Rect(0, 0, width, height);
498 params.delegate = new ShellWindowDelegateView(this); 498 params.delegate = new ShellWindowDelegateView(this);
499 params.top_level = true;
500 params.remove_standard_frame = true; 499 params.remove_standard_frame = true;
501 window_widget_->Init(params); 500 window_widget_->Init(params);
502 #endif 501 #endif
503 502
504 content_size_ = gfx::Size(width, height); 503 content_size_ = gfx::Size(width, height);
505 504
506 window_ = window_widget_->GetNativeWindow(); 505 window_ = window_widget_->GetNativeWindow();
507 // Call ShowRootWindow on RootWindow created by WMTestHelper without 506 // Call ShowRootWindow on RootWindow created by WMTestHelper without
508 // which XWindow owned by RootWindow doesn't get mapped. 507 // which XWindow owned by RootWindow doesn't get mapped.
509 window_->GetHost()->Show(); 508 window_->GetHost()->Show();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 561
563 void Shell::PlatformWebContentsFocused(WebContents* contents) { 562 void Shell::PlatformWebContentsFocused(WebContents* contents) {
564 if (headless_) 563 if (headless_)
565 return; 564 return;
566 ShellWindowDelegateView* delegate_view = 565 ShellWindowDelegateView* delegate_view =
567 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 566 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
568 delegate_view->OnWebContentsFocused(contents); 567 delegate_view->OnWebContentsFocused(contents);
569 } 568 }
570 569
571 } // namespace content 570 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/screen_capture_notification_ui_views.cc ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698