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

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

Issue 14031021: Save and restore State for ShellWindows, including panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 gfx::Rect Panel::GetRestoredBounds() const { 248 gfx::Rect Panel::GetRestoredBounds() const {
249 gfx::Rect bounds = native_panel_->GetPanelBounds(); 249 gfx::Rect bounds = native_panel_->GetPanelBounds();
250 bounds.set_y(bounds.bottom() - full_size_.height()); 250 bounds.set_y(bounds.bottom() - full_size_.height());
251 bounds.set_x(bounds.right() - full_size_.width()); 251 bounds.set_x(bounds.right() - full_size_.width());
252 bounds.set_size(full_size_); 252 bounds.set_size(full_size_);
253 return bounds; 253 return bounds;
254 } 254 }
255 255
256 ui::WindowShowState Panel::GetRestoredState() const {
257 return ui::SHOW_STATE_NORMAL;
258 }
259
256 gfx::Rect Panel::GetBounds() const { 260 gfx::Rect Panel::GetBounds() const {
257 return native_panel_->GetPanelBounds(); 261 return native_panel_->GetPanelBounds();
258 } 262 }
259 263
260 void Panel::Show() { 264 void Panel::Show() {
261 if (manager()->display_settings_provider()->is_full_screen() || !collection_) 265 if (manager()->display_settings_provider()->is_full_screen() || !collection_)
262 return; 266 return;
263 267
264 native_panel_->ShowPanel(); 268 native_panel_->ShowPanel();
265 } 269 }
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 885
882 // static 886 // static
883 void Panel::FormatTitleForDisplay(string16* title) { 887 void Panel::FormatTitleForDisplay(string16* title) {
884 size_t current_index = 0; 888 size_t current_index = 0;
885 size_t match_index; 889 size_t match_index;
886 while ((match_index = title->find(L'\n', current_index)) != string16::npos) { 890 while ((match_index = title->find(L'\n', current_index)) != string16::npos) {
887 title->replace(match_index, 1, string16()); 891 title->replace(match_index, 1, string16());
888 current_index = match_index; 892 current_index = match_index;
889 } 893 }
890 } 894 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/views/extensions/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698