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

Side by Side Diff: chrome/browser/views/constrained_window_impl.cc

Issue 18804: OpaqueNonClientView cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/views/frame/opaque_non_client_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/views/constrained_window_impl.h" 5 #include "chrome/browser/views/constrained_window_impl.h"
6 6
7 #include "base/gfx/rect.h" 7 #include "base/gfx/rect.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/app/theme/theme_resources.h" 9 #include "chrome/app/theme/theme_resources.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return component; 367 return component;
368 368
369 // Then see if the point is within any of the window controls. 369 // Then see if the point is within any of the window controls.
370 gfx::Rect button_bounds = 370 gfx::Rect button_bounds =
371 close_button_->GetBounds(APPLY_MIRRORING_TRANSFORMATION); 371 close_button_->GetBounds(APPLY_MIRRORING_TRANSFORMATION);
372 if (button_bounds.Contains(point)) 372 if (button_bounds.Contains(point))
373 return HTCLOSE; 373 return HTCLOSE;
374 if (icon_bounds_.Contains(point)) 374 if (icon_bounds_.Contains(point))
375 return HTSYSMENU; 375 return HTSYSMENU;
376 376
377 component = GetHTComponentForFrame(point, kResizeAreaSize, 377 component = GetHTComponentForFrame(point, kResizeAreaNorthSize,
378 kResizeAreaCornerSize, 378 kResizeAreaSize, kResizeAreaSize, kResizeAreaCornerSize,
379 kResizeAreaNorthSize, 379 window_delegate_->CanResize());
380 window_delegate_->CanResize());
381 if (component == HTNOWHERE) { 380 if (component == HTNOWHERE) {
382 // Finally fall back to the caption. 381 // Finally fall back to the caption.
383 if (bounds().Contains(point)) 382 if (bounds().Contains(point))
384 component = HTCAPTION; 383 component = HTCAPTION;
385 // Otherwise, the point is outside the window's bounds. 384 // Otherwise, the point is outside the window's bounds.
386 } 385 }
387 return component; 386 return component;
388 } 387 }
389 388
390 void ConstrainedWindowNonClientView::GetWindowMask(const gfx::Size& size, 389 void ConstrainedWindowNonClientView::GetWindowMask(const gfx::Size& size,
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 ConstrainedWindow* ConstrainedWindow::CreateConstrainedDialog( 739 ConstrainedWindow* ConstrainedWindow::CreateConstrainedDialog(
741 TabContents* parent, 740 TabContents* parent,
742 const gfx::Rect& initial_bounds, 741 const gfx::Rect& initial_bounds,
743 views::View* contents_view, 742 views::View* contents_view,
744 views::WindowDelegate* window_delegate) { 743 views::WindowDelegate* window_delegate) {
745 ConstrainedWindowImpl* window = new ConstrainedWindowImpl(parent, 744 ConstrainedWindowImpl* window = new ConstrainedWindowImpl(parent,
746 window_delegate); 745 window_delegate);
747 window->InitAsDialog(initial_bounds); 746 window->InitAsDialog(initial_bounds);
748 return window; 747 return window;
749 } 748 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/frame/opaque_non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698