summaryrefslogtreecommitdiffstats
path: root/chrome/views/window.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix Issue 2918 in chromium: Chrome dialog displayed in large size with ↵hbono@chromium.org2008-10-301-1/+1
| | | | | | | | Meiryo font.This issue is caused by a font whose text metric |tmAveCharWidth| is not precise as noted in Microsoft Knowledge Base 145994 (*1) To handle this case, this change uses the ChromeFont::horizontal_dlus_to_pixels() function instead of the ChromeFont::ave_char_width() function.(*1) http://support.microsoft.com/kb/145994BUG=2918 Review URL: http://codereview.chromium.org/8051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4213 0039d316-1c4b-4281-b951-d872f2087c98
* Support shortcut show styles for "run maximized", "run minimized" etc.ben@chromium.org2008-10-171-1/+5
| | | | | | | http://crbug.com/3278 Review URL: http://codereview.chromium.org/7504 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3579 0039d316-1c4b-4281-b951-d872f2087c98
* testing something elseben@chromium.org2008-10-171-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3544 0039d316-1c4b-4281-b951-d872f2087c98
* Removes an unneeded override.sky@google.com2008-10-171-6/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7398 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3526 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeViews namespace to viewsben@chromium.org2008-10-161-3/+3
| | | | | | http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
* Fix weird NC painting in classic mode by removing an apparently unnecessary ↵ben@chromium.org2008-10-161-4/+1
| | | | | | | | | window style. http://crbug.com/3264 Review URL: http://codereview.chromium.org/7442 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3494 0039d316-1c4b-4281-b951-d872f2087c98
* revert the testbeng@google.com2008-10-161-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3454 0039d316-1c4b-4281-b951-d872f2087c98
* a quick testbeng@google.com2008-10-161-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3451 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ViewContainer to Container and HWNDViewContainer to ContainerWin.ben@chromium.org2008-10-161-16/+14
| | | | | | | http://crbug.com/3430 Review URL: http://codereview.chromium.org/7376 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3441 0039d316-1c4b-4281-b951-d872f2087c98
* Convert GetPreferredSize from:beng@google.com2008-10-151-5/+6
| | | | | | | | | | | | | | | | | void GetPreferredSize(CSize* out); to: gfx::Size GetPreferredSize(); .. and update some other places to use gfx::Size as well. http://crbug.com/2186 Review URL: http://codereview.chromium.org/7344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3400 0039d316-1c4b-4281-b951-d872f2087c98
* The window class now set the initial focus after the window is made visible. ↵jcampan@chromium.org2008-10-091-13/+2
| | | | | | | | | | The SetInitialFocus method needs to be changed to still work. BUG=2519 TEST=Open Chrome, the location bar has focus, type something the drop down menu shows. Press ESC, the drop down menu should go. Review URL: http://codereview.chromium.org/7030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3130 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land this earlier change. Will deal with dist crashes as they arise.ben@chromium.org2008-10-091-0/+3
| | | | | | | | | | | | | | Make sure the frame is set to the foreground when: - opening from a shortcut when an existing frame is already open - pressing Ctrl+T from an app window http://crbug.com/2477 R=jcampan git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3103 0039d316-1c4b-4281-b951-d872f2087c98
* roll backbeng@google.com2008-09-191-3/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2402 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the frame is set to the foreground when:ben@chromium.org2008-09-191-0/+3
| | | | | | | | | | | - opening from a shortcut when an existing frame is already open - pressing Ctrl+T from an app window http://crbug.com/2477 Review URL: http://codereview.chromium.org/3134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2399 0039d316-1c4b-4281-b951-d872f2087c98
* Fix GDI leak in Window object (leak of HICONs)ben@chromium.org2008-09-171-4/+12
| | | | | | | | http://crbug.com/2322 Review URL: http://codereview.chromium.org/3120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2341 0039d316-1c4b-4281-b951-d872f2087c98
* Rename legacy methods that were in CamelCase to unix_hacker.erg@google.com2008-09-171-2/+2
| | | | | | | | | Required going through and modifying some of the code to solve name clashes. Review URL: http://codereview.chromium.org/2945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2337 0039d316-1c4b-4281-b951-d872f2087c98
* Support WM_APPCOMMAND on Window. Make it just pass through to ↵beng@google.com2008-09-081-0/+12
| | | | | | | | | | | | WindowDelegate::ExecuteWindowsCommand. The delegate needs to pre-translate for it. This allows my mouse's back and forward buttons to work on the new frames. B=1031854 Review URL: http://codereview.chromium.org/1620 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1849 0039d316-1c4b-4281-b951-d872f2087c98
* Make the AeroGlassFrame better:beng@google.com2008-08-251-1/+39
| | | | | | | | | | | - client edge rendering is now pixel-perfect for all BrowserTypes. - fix NCCALCSIZE handling that was making our top-right corner less than perfectly round - make system menu work - remove some unnecessary functions B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1340 0039d316-1c4b-4281-b951-d872f2087c98
* roll back r1297 for nowbeng@google.com2008-08-241-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1298 0039d316-1c4b-4281-b951-d872f2087c98
* Fix task manager crash by releasing the delegate's scoped_ptr back to the ↵beng@google.com2008-08-241-0/+1
| | | | | | | | window when the window is destroyed, not when the window delegate is destroyed, since some use cases recycle the delegate. B=1333829 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1297 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Allow popups using the new frames to be sized correctly. This involved a ↵beng@google.com2008-08-201-10/+9
| | | | | | | | | slight tweak to how RestoreWindowPosition on Window works - if the window is opened with specified bounds, we still ask the delegate to try and restore the position. The delegate can use the provided bounds as a hint (in the popup case the bounds aren't the true layout bounds of the window, rather the rect contains the window position and content area size) to return the actual bounds of the window. B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1117 0039d316-1c4b-4281-b951-d872f2087c98
* Large patch set (159 files total) to cleanup the includes.maruel@google.com2008-08-151-0/+4
| | | | | | | | | | - Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
* If a Window is created with specified bounds, make sure its sized to them!beng@google.com2008-08-141-1/+8
| | | | | | B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@900 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for ChromeViews::Windows to disable inactive rendering. This is ↵beng@google.com2008-08-111-12/+21
| | | | | | | | | for the new frames to make it so when infobubbles are activated the window frame isn't deactivated. B=1318343 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@659 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the window icon to be shown in the task bar, Alt+Tab etc.beng@google.com2008-08-091-0/+12
| | | | | | | B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@614 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing an issue where BiDi text in window titles was not displayed correctly ↵idana@google.com2008-08-051-0/+7
| | | | | | | | on Vista with aero. BUG=1306227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@385 0039d316-1c4b-4281-b951-d872f2087c98
* Add the AeroGlassFrame and AeroGlassNonClientView for Vista.beng@google.com2008-08-051-3/+19
| | | | | | | | Note that AeroGlassFrame needs a NonClientView as well - even though Windows draws most of the frame and its borders, we do some custom rendering in the non-client area, such as the distributor logo, the client edge and toolbar backgrounds. This necessitated allowing Window to support an optional NonClientView. I just jimmied this in for now... can clean up that API later if desired. B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@352 0039d316-1c4b-4281-b951-d872f2087c98
* Move some methods from public to protected, since only subclasses should be ↵beng@google.com2008-07-311-56/+56
| | | | | | | | | | calling them. Move some data members from protected to private and provide a protected setter, per C++ style guidelines. B=1293984 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157 0039d316-1c4b-4281-b951-d872f2087c98
* Move dialog-specific aspects of ClientView into a new subclass DialogClientView.beng@google.com2008-07-311-80/+23
| | | | | | | | | | | | | | ClientView becomes a generic representation of the View that occupies the "client area" of a window. All Windows now require a Client View (though they can use the default). Adjust WindowDelegate to provide a method for constructing the ClientView for a Window. The DialogDelegate overrides this to construct the DialogClientView. In the future, other specialized delegates will construct ClientViews specific to them, e.g. WizardDelegate would construct WizardClientView. Adjust the Window Init method to set up this new required Client View, and make some tweaks to CustomFrameWindow to make all this work. Remove all traces of dialog specific handling in Window into DialogClientView. B=1280060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153 0039d316-1c4b-4281-b951-d872f2087c98
* Make HWNDViewContainer set up its contents view separately from its Init method.beng@google.com2008-07-301-5/+5
| | | | | | | | | This is needed as a first step in further adjustments I'm going to be making to Window, ClientView, etc. B=1280060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105 0039d316-1c4b-4281-b951-d872f2087c98
* roll back this part of the fix since it has unintended side effects when ↵beng@google.com2008-07-301-1/+2
| | | | | | calling virtual overrides git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104 0039d316-1c4b-4281-b951-d872f2087c98
* Move the initial sizing of a Window into a separate function ↵beng@google.com2008-07-301-71/+72
| | | | | | | | (SetInitialBounds) to tidy up the Init method a bit. Move SetInitialFocus into private section since it's not used by subclasses. B=1293984 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99 0039d316-1c4b-4281-b951-d872f2087c98
* Window Delegate Improvements:beng@google.com2008-07-301-100/+81
| | | | | | | | | | | | | | | | | | | | | | - Windows now must have a Delegate. Just construct the default WindowDelegate if you don't want to have to write one in testing. - Windows now obtain their contents view by asking the delegate via WindowDelegate::GetContentsView. - Contents views no longer need to manually store a pointer to the Window that contains them, WindowDelegate does this automatically via its window() accessor. Reviewer notes: - review window_delegate.h first, then - window.h/cc - custom frame window.h/cc - constrained_window_impl.h/cc - then everything else (just updating all call sites) B=1280060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+660
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98