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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 virtual void WindowClosing() OVERRIDE { | 264 virtual void WindowClosing() OVERRIDE { |
265 if (shell_) { | 265 if (shell_) { |
266 delete shell_; | 266 delete shell_; |
267 shell_ = NULL; | 267 shell_ = NULL; |
268 } | 268 } |
269 } | 269 } |
270 virtual View* GetContentsView() OVERRIDE { return this; } | 270 virtual View* GetContentsView() OVERRIDE { return this; } |
271 | 271 |
272 // Overridden from View | 272 // Overridden from View |
| 273 virtual gfx::Size GetMinimumSize() OVERRIDE { |
| 274 // We want to be able to make the window smaller than its initial |
| 275 // (preferred) size. |
| 276 return gfx::Size(); |
| 277 } |
273 virtual void ViewHierarchyChanged( | 278 virtual void ViewHierarchyChanged( |
274 const ViewHierarchyChangedDetails& details) OVERRIDE { | 279 const ViewHierarchyChangedDetails& details) OVERRIDE { |
275 if (details.is_add && details.child == this) { | 280 if (details.is_add && details.child == this) { |
276 InitShellWindow(); | 281 InitShellWindow(); |
277 } | 282 } |
278 } | 283 } |
279 | 284 |
280 // Overridden from AcceleratorTarget: | 285 // Overridden from AcceleratorTarget: |
281 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE { | 286 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE { |
282 switch (accelerator.key_code()) { | 287 switch (accelerator.key_code()) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 } | 420 } |
416 | 421 |
417 void Shell::PlatformSetTitle(const base::string16& title) { | 422 void Shell::PlatformSetTitle(const base::string16& title) { |
418 ShellWindowDelegateView* delegate_view = | 423 ShellWindowDelegateView* delegate_view = |
419 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 424 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
420 delegate_view->SetWindowTitle(title); | 425 delegate_view->SetWindowTitle(title); |
421 window_widget_->UpdateWindowTitle(); | 426 window_widget_->UpdateWindowTitle(); |
422 } | 427 } |
423 | 428 |
424 } // namespace content | 429 } // namespace content |
OLD | NEW |