| 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/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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 347 } |
| 348 virtual void WindowClosing() OVERRIDE { | 348 virtual void WindowClosing() OVERRIDE { |
| 349 if (shell_) { | 349 if (shell_) { |
| 350 delete shell_; | 350 delete shell_; |
| 351 shell_ = NULL; | 351 shell_ = NULL; |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 virtual View* GetContentsView() OVERRIDE { return this; } | 354 virtual View* GetContentsView() OVERRIDE { return this; } |
| 355 | 355 |
| 356 // Overridden from View | 356 // Overridden from View |
| 357 virtual gfx::Size GetMinimumSize() OVERRIDE { | 357 virtual gfx::Size GetMinimumSize() const OVERRIDE { |
| 358 // We want to be able to make the window smaller than its initial | 358 // We want to be able to make the window smaller than its initial |
| 359 // (preferred) size. | 359 // (preferred) size. |
| 360 return gfx::Size(); | 360 return gfx::Size(); |
| 361 } | 361 } |
| 362 virtual void ViewHierarchyChanged( | 362 virtual void ViewHierarchyChanged( |
| 363 const ViewHierarchyChangedDetails& details) OVERRIDE { | 363 const ViewHierarchyChangedDetails& details) OVERRIDE { |
| 364 if (details.is_add && details.child == this) { | 364 if (details.is_add && details.child == this) { |
| 365 InitShellWindow(); | 365 InitShellWindow(); |
| 366 } | 366 } |
| 367 } | 367 } |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 562 |
| 563 void Shell::PlatformWebContentsFocused(WebContents* contents) { | 563 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
| 564 if (headless_) | 564 if (headless_) |
| 565 return; | 565 return; |
| 566 ShellWindowDelegateView* delegate_view = | 566 ShellWindowDelegateView* delegate_view = |
| 567 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 567 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
| 568 delegate_view->OnWebContentsFocused(contents); | 568 delegate_view->OnWebContentsFocused(contents); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace content | 571 } // namespace content |
| OLD | NEW |