| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ | 5 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ |
| 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ | 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/host_desktop.h" | 10 #include "chrome/browser/ui/host_desktop.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // non-NULL value for |browser|. | 102 // non-NULL value for |browser|. |
| 103 static void GetBrowserWindowBoundsAndShowState( | 103 static void GetBrowserWindowBoundsAndShowState( |
| 104 const std::string& app_name, | 104 const std::string& app_name, |
| 105 const gfx::Rect& specified_bounds, | 105 const gfx::Rect& specified_bounds, |
| 106 const Browser* browser, | 106 const Browser* browser, |
| 107 gfx::Rect* window_bounds, | 107 gfx::Rect* window_bounds, |
| 108 ui::WindowShowState* show_state); | 108 ui::WindowShowState* show_state); |
| 109 | 109 |
| 110 // Returns the default origin for popups of the given size. | 110 // Returns the default origin for popups of the given size. |
| 111 static gfx::Point GetDefaultPopupOrigin(const gfx::Size& size, | 111 static gfx::Point GetDefaultPopupOrigin(const gfx::Size& size, |
| 112 chrome::HostDesktopType type); | 112 ui::HostDesktopType type); |
| 113 | 113 |
| 114 // How much horizontal and vertical offset there is between newly | 114 // How much horizontal and vertical offset there is between newly |
| 115 // opened windows. This value may be different on each platform. | 115 // opened windows. This value may be different on each platform. |
| 116 static const int kWindowTilePixels; | 116 static const int kWindowTilePixels; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 // The edge of the screen to check for out-of-bounds. | 119 // The edge of the screen to check for out-of-bounds. |
| 120 enum Edge { TOP, LEFT, BOTTOM, RIGHT }; | 120 enum Edge { TOP, LEFT, BOTTOM, RIGHT }; |
| 121 | 121 |
| 122 // Gets the size and placement of the last active window. Returns true if this | 122 // Gets the size and placement of the last active window. Returns true if this |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 scoped_ptr<TargetDisplayProvider> target_display_provider_; | 186 scoped_ptr<TargetDisplayProvider> target_display_provider_; |
| 187 gfx::Screen* screen_; // not owned. | 187 gfx::Screen* screen_; // not owned. |
| 188 | 188 |
| 189 // Note that this browser handle might be NULL. | 189 // Note that this browser handle might be NULL. |
| 190 const Browser* browser_; | 190 const Browser* browser_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(WindowSizer); | 192 DISALLOW_COPY_AND_ASSIGN(WindowSizer); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ | 195 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_ |
| OLD | NEW |