| 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 "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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 #else | 368 #else |
| 369 window_widget_ = views::Widget::CreateWindowWithBounds( | 369 window_widget_ = views::Widget::CreateWindowWithBounds( |
| 370 new ShellWindowDelegateView(this), gfx::Rect(0, 0, width, height)); | 370 new ShellWindowDelegateView(this), gfx::Rect(0, 0, width, height)); |
| 371 #endif | 371 #endif |
| 372 | 372 |
| 373 content_size_ = gfx::Size(width, height); | 373 content_size_ = gfx::Size(width, height); |
| 374 | 374 |
| 375 window_ = window_widget_->GetNativeWindow(); | 375 window_ = window_widget_->GetNativeWindow(); |
| 376 // Call ShowRootWindow on RootWindow created by MinimalShell without | 376 // Call ShowRootWindow on RootWindow created by MinimalShell without |
| 377 // which XWindow owned by RootWindow doesn't get mapped. | 377 // which XWindow owned by RootWindow doesn't get mapped. |
| 378 window_->GetDispatcher()->ShowRootWindow(); | 378 window_->GetDispatcher()->host()->Show(); |
| 379 window_widget_->Show(); | 379 window_widget_->Show(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void Shell::PlatformSetContents() { | 382 void Shell::PlatformSetContents() { |
| 383 ShellWindowDelegateView* delegate_view = | 383 ShellWindowDelegateView* delegate_view = |
| 384 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 384 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
| 385 delegate_view->SetWebContents(web_contents_.get(), content_size_); | 385 delegate_view->SetWebContents(web_contents_.get(), content_size_); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void Shell::PlatformResizeSubViews() { | 388 void Shell::PlatformResizeSubViews() { |
| 389 } | 389 } |
| 390 | 390 |
| 391 void Shell::Close() { | 391 void Shell::Close() { |
| 392 window_widget_->CloseNow(); | 392 window_widget_->CloseNow(); |
| 393 } | 393 } |
| 394 | 394 |
| 395 void Shell::PlatformSetTitle(const string16& title) { | 395 void Shell::PlatformSetTitle(const string16& title) { |
| 396 ShellWindowDelegateView* delegate_view = | 396 ShellWindowDelegateView* delegate_view = |
| 397 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 397 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
| 398 delegate_view->SetWindowTitle(title); | 398 delegate_view->SetWindowTitle(title); |
| 399 window_widget_->UpdateWindowTitle(); | 399 window_widget_->UpdateWindowTitle(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 } // namespace content | 402 } // namespace content |
| OLD | NEW |