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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 15807006: Fix the problem that the minimized docked panel is not unsqueezed back to its original size when th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 Activate(); 463 Activate();
464 FlashFrame(false); 464 FlashFrame(false);
465 } 465 }
466 466
467 void Panel::OnMinimizeButtonClicked(panel::ClickModifier modifier) { 467 void Panel::OnMinimizeButtonClicked(panel::ClickModifier modifier) {
468 if (collection_) 468 if (collection_)
469 collection_->OnMinimizeButtonClicked(this, modifier); 469 collection_->OnMinimizeButtonClicked(this, modifier);
470 } 470 }
471 471
472 void Panel::OnRestoreButtonClicked(panel::ClickModifier modifier) { 472 void Panel::OnRestoreButtonClicked(panel::ClickModifier modifier) {
473 if (collection_) 473 // Clicking the restore button has the same behavior as clicking the titlebar.
474 collection_->OnRestoreButtonClicked(this, modifier); 474 OnTitlebarClicked(modifier);
475 } 475 }
476 476
477 void Panel::OnWindowSizeAvailable() { 477 void Panel::OnWindowSizeAvailable() {
478 ConfigureAutoResize(GetWebContents()); 478 ConfigureAutoResize(GetWebContents());
479 } 479 }
480 480
481 void Panel::OnNativePanelClosed() { 481 void Panel::OnNativePanelClosed() {
482 // Ensure previously enqueued OnImageLoaded callbacks are ignored. 482 // Ensure previously enqueued OnImageLoaded callbacks are ignored.
483 image_loader_ptr_factory_.InvalidateWeakPtrs(); 483 image_loader_ptr_factory_.InvalidateWeakPtrs();
484 registrar_.RemoveAll(); 484 registrar_.RemoveAll();
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 // static 888 // static
889 void Panel::FormatTitleForDisplay(string16* title) { 889 void Panel::FormatTitleForDisplay(string16* title) {
890 size_t current_index = 0; 890 size_t current_index = 0;
891 size_t match_index; 891 size_t match_index;
892 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { 892 while ((match_index = title->find(L'\n', current_index)) != string16::npos) {
893 title->replace(match_index, 1, string16()); 893 title->replace(match_index, 1, string16());
894 current_index = match_index; 894 current_index = match_index;
895 } 895 }
896 } 896 }
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