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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 511393003: No longer register app window placement preference keys on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update to ToT Created 6 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 // Translate WM_APPCOMMAND command ids into a command id that the browser 1591 // Translate WM_APPCOMMAND command ids into a command id that the browser
1592 // knows how to handle. 1592 // knows how to handle.
1593 int command_id_from_app_command = GetCommandIDForAppCommandID(command_id); 1593 int command_id_from_app_command = GetCommandIDForAppCommandID(command_id);
1594 if (command_id_from_app_command != -1) 1594 if (command_id_from_app_command != -1)
1595 command_id = command_id_from_app_command; 1595 command_id = command_id_from_app_command;
1596 1596
1597 return chrome::ExecuteCommand(browser_.get(), command_id); 1597 return chrome::ExecuteCommand(browser_.get(), command_id);
1598 } 1598 }
1599 1599
1600 std::string BrowserView::GetWindowName() const { 1600 std::string BrowserView::GetWindowName() const {
1601 return chrome::GetWindowPlacementKey(browser_.get()); 1601 return chrome::GetWindowName(browser_.get());
1602 } 1602 }
1603 1603
1604 void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds, 1604 void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds,
1605 ui::WindowShowState show_state) { 1605 ui::WindowShowState show_state) {
1606 // If IsFullscreen() is true, we've just changed into fullscreen mode, and 1606 // If IsFullscreen() is true, we've just changed into fullscreen mode, and
1607 // we're catching the going-into-fullscreen sizing and positioning calls, 1607 // we're catching the going-into-fullscreen sizing and positioning calls,
1608 // which we want to ignore. 1608 // which we want to ignore.
1609 if (!IsFullscreen() && frame_->ShouldSaveWindowPlacement() && 1609 if (!IsFullscreen() && frame_->ShouldSaveWindowPlacement() &&
1610 chrome::ShouldSaveWindowPlacement(browser_.get())) { 1610 chrome::ShouldSaveWindowPlacement(browser_.get())) {
1611 WidgetDelegate::SaveWindowPlacement(bounds, show_state); 1611 WidgetDelegate::SaveWindowPlacement(bounds, show_state);
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2517 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2518 gfx::Point icon_bottom( 2518 gfx::Point icon_bottom(
2519 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2519 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2520 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2520 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2521 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2521 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2522 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2522 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2523 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2523 top_arrow_height = infobar_top.y() - icon_bottom.y();
2524 } 2524 }
2525 return top_arrow_height; 2525 return top_arrow_height;
2526 } 2526 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/window_sizer/window_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698