| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/dock_info.h" | 5 #include "chrome/browser/dock_info.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // The window we're looking for. | 108 // The window we're looking for. |
| 109 HWND target_; | 109 HWND target_; |
| 110 | 110 |
| 111 // Location of window to find. | 111 // Location of window to find. |
| 112 gfx::Point screen_loc_; | 112 gfx::Point screen_loc_; |
| 113 | 113 |
| 114 // Is target_ the top most window? This is initially false but set to true | 114 // Is target_ the top most window? This is initially false but set to true |
| 115 // in ShouldStopIterating if target_ is passed in. | 115 // in ShouldStopIterating if target_ is passed in. |
| 116 bool is_top_most_; | 116 bool is_top_most_; |
| 117 | 117 |
| 118 ScopedHRGN tmp_region_; | 118 ScopedRegion tmp_region_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(TopMostFinder); | 120 DISALLOW_COPY_AND_ASSIGN(TopMostFinder); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 // WindowFinder --------------------------------------------------------------- | 123 // WindowFinder --------------------------------------------------------------- |
| 124 | 124 |
| 125 // Helper class to determine if a particular point contains a window from our | 125 // Helper class to determine if a particular point contains a window from our |
| 126 // process. | 126 // process. |
| 127 class LocalProcessWindowFinder : public BaseWindowFinder { | 127 class LocalProcessWindowFinder : public BaseWindowFinder { |
| 128 public: | 128 public: |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { | 303 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { |
| 304 if (IsZoomed(window())) { | 304 if (IsZoomed(window())) { |
| 305 // We're docking relative to another window, we need to make sure the | 305 // We're docking relative to another window, we need to make sure the |
| 306 // window we're docking to isn't maximized. | 306 // window we're docking to isn't maximized. |
| 307 ShowWindow(window(), SW_RESTORE | SW_SHOWNA); | 307 ShowWindow(window(), SW_RESTORE | SW_SHOWNA); |
| 308 } | 308 } |
| 309 SetWindowPos(window(), HWND_TOP, bounds.x(), bounds.y(), bounds.width(), | 309 SetWindowPos(window(), HWND_TOP, bounds.x(), bounds.y(), bounds.width(), |
| 310 bounds.height(), SWP_NOACTIVATE | SWP_NOOWNERZORDER); | 310 bounds.height(), SWP_NOACTIVATE | SWP_NOOWNERZORDER); |
| 311 } | 311 } |
| OLD | NEW |