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/context_factory.h" | 9 #include "content/public/browser/context_factory.h" |
10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 shell_->GoBackOrForward(1); | 335 shell_->GoBackOrForward(1); |
336 else if (sender == refresh_button_) | 336 else if (sender == refresh_button_) |
337 shell_->Reload(); | 337 shell_->Reload(); |
338 else if (sender == stop_button_) | 338 else if (sender == stop_button_) |
339 shell_->Stop(); | 339 shell_->Stop(); |
340 } | 340 } |
341 | 341 |
342 // Overridden from WidgetDelegateView | 342 // Overridden from WidgetDelegateView |
343 virtual bool CanResize() const OVERRIDE { return true; } | 343 virtual bool CanResize() const OVERRIDE { return true; } |
344 virtual bool CanMaximize() const OVERRIDE { return true; } | 344 virtual bool CanMaximize() const OVERRIDE { return true; } |
| 345 virtual bool CanMinimize() const OVERRIDE { return true; } |
345 virtual base::string16 GetWindowTitle() const OVERRIDE { | 346 virtual base::string16 GetWindowTitle() const OVERRIDE { |
346 return title_; | 347 return title_; |
347 } | 348 } |
348 virtual void WindowClosing() OVERRIDE { | 349 virtual void WindowClosing() OVERRIDE { |
349 if (shell_) { | 350 if (shell_) { |
350 delete shell_; | 351 delete shell_; |
351 shell_ = NULL; | 352 shell_ = NULL; |
352 } | 353 } |
353 } | 354 } |
354 virtual View* GetContentsView() OVERRIDE { return this; } | 355 virtual View* GetContentsView() OVERRIDE { return this; } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 | 567 |
567 void Shell::PlatformWebContentsFocused(WebContents* contents) { | 568 void Shell::PlatformWebContentsFocused(WebContents* contents) { |
568 if (headless_) | 569 if (headless_) |
569 return; | 570 return; |
570 ShellWindowDelegateView* delegate_view = | 571 ShellWindowDelegateView* delegate_view = |
571 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 572 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
572 delegate_view->OnWebContentsFocused(contents); | 573 delegate_view->OnWebContentsFocused(contents); |
573 } | 574 } |
574 | 575 |
575 } // namespace content | 576 } // namespace content |
OLD | NEW |