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

Side by Side Diff: chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc

Issue 9187061: Preliminary implementation of Google-style dialogs in ash::internal::DialogFrameView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
OLDNEW
1 // Copyright (c) 2011 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 #include "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/app_panel_browser_frame_view.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/views/frame/browser_frame.h" 9 #include "chrome/browser/ui/views/frame/browser_frame.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "grit/chromium_strings.h" 12 #include "grit/chromium_strings.h"
13 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
14 #include "grit/theme_resources_standard.h" 14 #include "grit/theme_resources_standard.h"
15 #include "grit/ui_resources.h" 15 #include "grit/ui_resources.h"
16 #include "grit/ui_resources_standard.h"
16 #include "ui/base/hit_test.h" 17 #include "ui/base/hit_test.h"
17 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
19 #include "ui/gfx/canvas.h" 20 #include "ui/gfx/canvas.h"
20 #include "ui/gfx/font.h" 21 #include "ui/gfx/font.h"
21 #include "ui/gfx/path.h" 22 #include "ui/gfx/path.h"
22 #include "ui/views/controls/button/image_button.h" 23 #include "ui/views/controls/button/image_button.h"
23 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
24 #include "ui/views/widget/widget_delegate.h" 25 #include "ui/views/widget/widget_delegate.h"
25 26
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 } 505 }
505 506
506 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width, 507 gfx::Rect AppPanelBrowserFrameView::CalculateClientAreaBounds(int width,
507 int height) const { 508 int height) const {
508 int top_height = NonClientTopBorderHeight(); 509 int top_height = NonClientTopBorderHeight();
509 int border_thickness = NonClientBorderThickness(); 510 int border_thickness = NonClientBorderThickness();
510 return gfx::Rect(border_thickness, top_height, 511 return gfx::Rect(border_thickness, top_height,
511 std::max(0, width - (2 * border_thickness)), 512 std::max(0, width - (2 * border_thickness)),
512 std::max(0, height - top_height - border_thickness)); 513 std::max(0, height - top_height - border_thickness));
513 } 514 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698