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

Side by Side Diff: apps/ui/views/app_window_frame_view.cc

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 2 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
« no previous file with comments | « apps/ui/views/app_window_frame_view.h ('k') | athena/athena.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "apps/ui/views/app_window_frame_view.h" 5 #include "apps/ui/views/app_window_frame_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "extensions/browser/app_window/native_app_window.h" 8 #include "components/native_app_window/draggable_region.h"
9 #include "extensions/common/draggable_region.h" 9 #include "components/native_app_window/native_app_window.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
11 #include "third_party/skia/include/core/SkPaint.h" 11 #include "third_party/skia/include/core/SkPaint.h"
12 #include "third_party/skia/include/core/SkRegion.h" 12 #include "third_party/skia/include/core/SkRegion.h"
13 #include "ui/base/hit_test.h" 13 #include "ui/base/hit_test.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
17 #include "ui/gfx/color_utils.h" 17 #include "ui/gfx/color_utils.h"
18 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
19 #include "ui/gfx/path.h" 19 #include "ui/gfx/path.h"
(...skipping 10 matching lines...) Expand all
30 const int kDefaultResizeAreaCornerSize = 16; 30 const int kDefaultResizeAreaCornerSize = 16;
31 const int kCaptionHeight = 25; 31 const int kCaptionHeight = 25;
32 32
33 } // namespace 33 } // namespace
34 34
35 namespace apps { 35 namespace apps {
36 36
37 const char AppWindowFrameView::kViewClassName[] = 37 const char AppWindowFrameView::kViewClassName[] =
38 "browser/ui/views/extensions/AppWindowFrameView"; 38 "browser/ui/views/extensions/AppWindowFrameView";
39 39
40 AppWindowFrameView::AppWindowFrameView(views::Widget* widget, 40 AppWindowFrameView::AppWindowFrameView(
41 extensions::NativeAppWindow* window, 41 views::Widget* widget,
42 bool draw_frame, 42 native_app_window::NativeAppWindow* window,
43 const SkColor& active_frame_color, 43 bool draw_frame,
44 const SkColor& inactive_frame_color) 44 const SkColor& active_frame_color,
45 const SkColor& inactive_frame_color)
45 : widget_(widget), 46 : widget_(widget),
46 window_(window), 47 window_(window),
47 draw_frame_(draw_frame), 48 draw_frame_(draw_frame),
48 active_frame_color_(active_frame_color), 49 active_frame_color_(active_frame_color),
49 inactive_frame_color_(inactive_frame_color), 50 inactive_frame_color_(inactive_frame_color),
50 close_button_(NULL), 51 close_button_(NULL),
51 maximize_button_(NULL), 52 maximize_button_(NULL),
52 restore_button_(NULL), 53 restore_button_(NULL),
53 minimize_button_(NULL), 54 minimize_button_(NULL),
54 resize_inside_bounds_size_(kDefaultResizeInsideBoundsSize), 55 resize_inside_bounds_size_(kDefaultResizeInsideBoundsSize),
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 restore_button_->SetImage( 399 restore_button_->SetImage(
399 views::CustomButton::STATE_NORMAL, 400 views::CustomButton::STATE_NORMAL,
400 rb.GetNativeImageNamed(IDR_APP_WINDOW_RESTORE).ToImageSkia()); 401 rb.GetNativeImageNamed(IDR_APP_WINDOW_RESTORE).ToImageSkia());
401 minimize_button_->SetImage( 402 minimize_button_->SetImage(
402 views::CustomButton::STATE_NORMAL, 403 views::CustomButton::STATE_NORMAL,
403 rb.GetNativeImageNamed(IDR_APP_WINDOW_MINIMIZE).ToImageSkia()); 404 rb.GetNativeImageNamed(IDR_APP_WINDOW_MINIMIZE).ToImageSkia());
404 } 405 }
405 } 406 }
406 407
407 } // namespace apps 408 } // namespace apps
OLDNEW
« no previous file with comments | « apps/ui/views/app_window_frame_view.h ('k') | athena/athena.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698