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

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

Issue 2222653002: Moves CustomFrameViewAsh to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/common/ash_layout_constants.h" 9 #include "ash/common/ash_layout_constants.h"
10 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h " 10 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h "
11 #include "ash/common/frame/default_header_painter.h" 11 #include "ash/common/frame/default_header_painter.h"
12 #include "ash/common/frame/frame_border_hit_test.h" 12 #include "ash/common/frame/frame_border_hit_test.h"
13 #include "ash/common/frame/header_painter_util.h" 13 #include "ash/common/frame/header_painter_util.h"
14 #include "ash/common/material_design/material_design_controller.h" 14 #include "ash/common/material_design/material_design_controller.h"
15 #include "ash/common/wm_lookup.h"
15 #include "ash/common/wm_shell.h" 16 #include "ash/common/wm_shell.h"
16 #include "ash/frame/frame_border_hit_test_controller.h" 17 #include "ash/common/wm_window.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 #include "chrome/app/chrome_command_ids.h" 19 #include "chrome/app/chrome_command_ids.h"
19 #include "chrome/browser/extensions/extension_util.h" 20 #include "chrome/browser/extensions/extension_util.h"
20 #include "chrome/browser/profiles/profiles_state.h" 21 #include "chrome/browser/profiles/profiles_state.h"
21 #include "chrome/browser/themes/theme_properties.h" 22 #include "chrome/browser/themes/theme_properties.h"
22 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" 23 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
23 #include "chrome/browser/ui/browser.h" 24 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/browser_commands.h" 25 #include "chrome/browser/ui/browser_commands.h"
25 #include "chrome/browser/ui/layout_constants.h" 26 #include "chrome/browser/ui/layout_constants.h"
26 #include "chrome/browser/ui/views/frame/browser_frame.h" 27 #include "chrome/browser/ui/views/frame/browser_frame.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 89
89 /////////////////////////////////////////////////////////////////////////////// 90 ///////////////////////////////////////////////////////////////////////////////
90 // BrowserNonClientFrameViewAsh, public: 91 // BrowserNonClientFrameViewAsh, public:
91 92
92 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh( 93 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh(
93 BrowserFrame* frame, 94 BrowserFrame* frame,
94 BrowserView* browser_view) 95 BrowserView* browser_view)
95 : BrowserNonClientFrameView(frame, browser_view), 96 : BrowserNonClientFrameView(frame, browser_view),
96 caption_button_container_(nullptr), 97 caption_button_container_(nullptr),
97 web_app_left_header_view_(nullptr), 98 web_app_left_header_view_(nullptr),
98 window_icon_(nullptr), 99 window_icon_(nullptr) {
99 frame_border_hit_test_controller_( 100 ash::WmLookup::Get()
100 new ash::FrameBorderHitTestController(frame)) { 101 ->GetWindowForWidget(frame)
102 ->InstallResizeHandleWindowTargeter(nullptr);
101 ash::WmShell::Get()->AddShellObserver(this); 103 ash::WmShell::Get()->AddShellObserver(this);
102 } 104 }
103 105
104 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { 106 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() {
105 ash::WmShell::Get()->RemoveShellObserver(this); 107 ash::WmShell::Get()->RemoveShellObserver(this);
106 } 108 }
107 109
108 void BrowserNonClientFrameViewAsh::Init() { 110 void BrowserNonClientFrameViewAsh::Init() {
109 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame()); 111 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame());
110 caption_button_container_->UpdateSizeButtonVisibility(); 112 caption_button_container_->UpdateSizeButtonVisibility();
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // TODO(pkasting): The "2 *" part of this makes no sense to me. 589 // TODO(pkasting): The "2 *" part of this makes no sense to me.
588 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, 590 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w,
589 img_y, img_w, img_h); 591 img_y, img_w, img_h);
590 592
591 // Toolbar/content separator. 593 // Toolbar/content separator.
592 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, 594 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness,
593 kClientEdgeThickness, 0); 595 kClientEdgeThickness, 0);
594 canvas->FillRect(toolbar_bounds, separator_color); 596 canvas->FillRect(toolbar_bounds, separator_color);
595 } 597 }
596 } 598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698