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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 bool CanResize() const override { return true; } | 244 bool CanResize() const override { return true; } |
245 bool CanMaximize() const override { return true; } | 245 bool CanMaximize() const override { return true; } |
246 bool CanMinimize() const override { return true; } | 246 bool CanMinimize() const override { return true; } |
247 base::string16 GetWindowTitle() const override { return title_; } | 247 base::string16 GetWindowTitle() const override { return title_; } |
248 void WindowClosing() override { | 248 void WindowClosing() override { |
249 if (shell_) { | 249 if (shell_) { |
250 delete shell_; | 250 delete shell_; |
251 shell_ = NULL; | 251 shell_ = NULL; |
252 } | 252 } |
253 } | 253 } |
254 View* GetContentsView() override { return this; } | |
255 | 254 |
256 // Overridden from View | 255 // Overridden from View |
257 gfx::Size GetMinimumSize() const override { | 256 gfx::Size GetMinimumSize() const override { |
258 // We want to be able to make the window smaller than its initial | 257 // We want to be able to make the window smaller than its initial |
259 // (preferred) size. | 258 // (preferred) size. |
260 return gfx::Size(); | 259 return gfx::Size(); |
261 } | 260 } |
262 void ViewHierarchyChanged( | 261 void ViewHierarchyChanged( |
263 const ViewHierarchyChangedDetails& details) override { | 262 const ViewHierarchyChangedDetails& details) override { |
264 if (details.is_add && details.child == this) { | 263 if (details.is_add && details.child == this) { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 void Shell::PlatformSetTitle(const base::string16& title) { | 441 void Shell::PlatformSetTitle(const base::string16& title) { |
443 if (headless_) | 442 if (headless_) |
444 return; | 443 return; |
445 ShellWindowDelegateView* delegate_view = | 444 ShellWindowDelegateView* delegate_view = |
446 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 445 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
447 delegate_view->SetWindowTitle(title); | 446 delegate_view->SetWindowTitle(title); |
448 window_widget_->UpdateWindowTitle(); | 447 window_widget_->UpdateWindowTitle(); |
449 } | 448 } |
450 | 449 |
451 } // namespace content | 450 } // namespace content |
OLD | NEW |