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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/browser/web_contents_view.h" 10 #include "content/public/browser/web_contents_view.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 gfx::Rect(0, 0, width, height)); 354 gfx::Rect(0, 0, width, height));
355 #else 355 #else
356 window_widget_ = 356 window_widget_ =
357 views::Widget::CreateWindowWithBounds(new ShellWindowDelegateView(this), 357 views::Widget::CreateWindowWithBounds(new ShellWindowDelegateView(this),
358 gfx::Rect(0, 0, width, height)); 358 gfx::Rect(0, 0, width, height));
359 #endif 359 #endif
360 360
361 window_ = window_widget_->GetNativeWindow(); 361 window_ = window_widget_->GetNativeWindow();
362 // Call ShowRootWindow on RootWindow created by MinimalShell without 362 // Call ShowRootWindow on RootWindow created by MinimalShell without
363 // which XWindow owned by RootWindow doesn't get mapped. 363 // which XWindow owned by RootWindow doesn't get mapped.
364 window_->GetRootWindow()->ShowRootWindow(); 364 window_->GetDispatcher()->ShowRootWindow();
365 window_widget_->Show(); 365 window_widget_->Show();
366 } 366 }
367 367
368 void Shell::PlatformSetContents() { 368 void Shell::PlatformSetContents() {
369 ShellWindowDelegateView* delegate_view = 369 ShellWindowDelegateView* delegate_view =
370 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 370 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
371 delegate_view->SetWebContents(web_contents_.get()); 371 delegate_view->SetWebContents(web_contents_.get());
372 } 372 }
373 373
374 void Shell::PlatformResizeSubViews() { 374 void Shell::PlatformResizeSubViews() {
375 } 375 }
376 376
377 void Shell::Close() { 377 void Shell::Close() {
378 window_widget_->CloseNow(); 378 window_widget_->CloseNow();
379 } 379 }
380 380
381 void Shell::PlatformSetTitle(const string16& title) { 381 void Shell::PlatformSetTitle(const string16& title) {
382 ShellWindowDelegateView* delegate_view = 382 ShellWindowDelegateView* delegate_view =
383 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 383 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
384 delegate_view->SetWindowTitle(title); 384 delegate_view->SetWindowTitle(title);
385 window_widget_->UpdateWindowTitle(); 385 window_widget_->UpdateWindowTitle();
386 } 386 }
387 387
388 } // namespace content 388 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698