Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: content/shell/browser/shell_views.cc

Issue 134223005: Aura content shell: make the window shrinkable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698