Lines Matching refs:bounds

46       gfx::Rect* bounds,
49 DCHECK(bounds);
66 bounds->SetRect(left, top, std::max(0, right - left),
89 gfx::Rect* bounds,
124 *bounds = window->GetRestoredBounds();
148 const gfx::Rect& bounds) const OVERRIDE {
171 // Find the size of the work area of the monitor that intersects the bounds
173 return screen->GetDisplayMatching(bounds);
235 gfx::Rect* bounds,
237 DCHECK(bounds);
241 *bounds = specified_bounds;
245 if (GetBrowserBoundsAsh(bounds, show_state))
249 if (bounds->IsEmpty()) {
251 if (GetLastActiveWindowBounds(bounds, show_state))
254 if (GetSavedWindowBounds(bounds, show_state))
259 GetDefaultWindowBounds(GetTargetDisplay(gfx::Rect()), bounds);
265 // Find the size of the work area of the monitor that intersects the bounds
269 gfx::Rect work_area = screen_->GetDisplayMatching(*bounds).work_area();
271 bounds->AdjustToFit(work_area);
275 gfx::Rect* bounds,
277 DCHECK(bounds);
280 !state_provider_->GetLastActiveWindowState(bounds, show_state))
282 gfx::Rect last_window_bounds = *bounds;
283 bounds->Offset(kWindowTilePixels, kWindowTilePixels);
284 AdjustBoundsToBeVisibleOnDisplay(screen_->GetDisplayMatching(*bounds),
286 bounds);
290 bool WindowSizer::GetSavedWindowBounds(gfx::Rect* bounds,
292 DCHECK(bounds);
296 !state_provider_->GetPersistentState(bounds,
300 AdjustBoundsToBeVisibleOnDisplay(GetTargetDisplay(*bounds),
302 bounds);
325 gfx::Rect screen_size = screen_->GetPrimaryDisplay().bounds();
349 gfx::Rect* bounds) const {
350 DCHECK(bounds);
352 // If |bounds| is empty, reset to the default size.
353 if (bounds->IsEmpty()) {
356 if (bounds->height() <= 0)
357 bounds->set_height(default_bounds.height());
358 if (bounds->width() <= 0)
359 bounds->set_width(default_bounds.width());
363 bounds->set_height(std::max(kMinVisibleHeight, bounds->height()));
364 bounds->set_width(std::max(kMinVisibleWidth, bounds->width()));
368 if (bounds->y() < work_area.y())
369 bounds->set_y(work_area.y());
371 // Reposition and resize the bounds if the saved_work_area is different from
373 // the bounds.
376 !work_area.Contains(*bounds)) {
377 bounds->set_width(std::min(bounds->width(), work_area.width()));
378 bounds->set_height(std::min(bounds->height(), work_area.height()));
379 bounds->set_x(
381 std::min(bounds->x(), work_area.right() - bounds->width())));
382 bounds->set_y(
384 std::min(bounds->y(), work_area.bottom() - bounds->height())));
393 bounds->set_height(std::min(work_area.height(), bounds->height()));
398 if (bounds->x() < work_area.x() || bounds->right() > work_area.right())
399 bounds->set_x(work_area.x());
403 if (bounds->y() < work_area.y() || bounds->bottom() > work_area.bottom())
404 bounds->set_y(work_area.y());
408 const int min_y = work_area.y() + kMinVisibleHeight - bounds->height();
409 const int min_x = work_area.x() + kMinVisibleWidth - bounds->width();
412 bounds->set_y(std::max(min_y, std::min(max_y, bounds->y())));
413 bounds->set_x(std::max(min_x, std::min(max_x, bounds->x())));
417 gfx::Display WindowSizer::GetTargetDisplay(const gfx::Rect& bounds) const {
418 return target_display_provider_->GetTargetDisplay(screen_, bounds);