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

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

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. Created 3 years, 9 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 | « chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm_lookup.h"
15 #include "ash/common/wm_shell.h" 14 #include "ash/common/wm_shell.h"
16 #include "ash/common/wm_window.h" 15 #include "ash/common/wm_window.h"
17 #include "base/feature_list.h" 16 #include "base/feature_list.h"
18 #include "build/build_config.h" 17 #include "build/build_config.h"
19 #include "chrome/browser/profiles/profiles_state.h" 18 #include "chrome/browser/profiles/profiles_state.h"
20 #include "chrome/browser/themes/theme_properties.h" 19 #include "chrome/browser/themes/theme_properties.h"
21 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" 20 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
22 #include "chrome/browser/ui/browser.h" 21 #include "chrome/browser/ui/browser.h"
23 #include "chrome/browser/ui/layout_constants.h" 22 #include "chrome/browser/ui/layout_constants.h"
24 #include "chrome/browser/ui/views/frame/browser_frame.h" 23 #include "chrome/browser/ui/views/frame/browser_frame.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 68
70 /////////////////////////////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////////////////////////////
71 // BrowserNonClientFrameViewAsh, public: 70 // BrowserNonClientFrameViewAsh, public:
72 71
73 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh( 72 BrowserNonClientFrameViewAsh::BrowserNonClientFrameViewAsh(
74 BrowserFrame* frame, 73 BrowserFrame* frame,
75 BrowserView* browser_view) 74 BrowserView* browser_view)
76 : BrowserNonClientFrameView(frame, browser_view), 75 : BrowserNonClientFrameView(frame, browser_view),
77 caption_button_container_(nullptr), 76 caption_button_container_(nullptr),
78 window_icon_(nullptr) { 77 window_icon_(nullptr) {
79 ash::WmLookup::Get() 78 ash::WmWindow::Get(frame->GetNativeWindow())
80 ->GetWindowForWidget(frame)
81 ->InstallResizeHandleWindowTargeter(nullptr); 79 ->InstallResizeHandleWindowTargeter(nullptr);
82 ash::WmShell::Get()->AddShellObserver(this); 80 ash::WmShell::Get()->AddShellObserver(this);
83 } 81 }
84 82
85 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { 83 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() {
86 ash::WmShell::Get()->RemoveShellObserver(this); 84 ash::WmShell::Get()->RemoveShellObserver(this);
87 } 85 }
88 86
89 void BrowserNonClientFrameViewAsh::Init() { 87 void BrowserNonClientFrameViewAsh::Init() {
90 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame()); 88 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame());
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 toolbar_bounds.width(), 0); 452 toolbar_bounds.width(), 0);
455 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), 453 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(),
456 separator_rect, true); 454 separator_rect, true);
457 455
458 // Toolbar/content separator. 456 // Toolbar/content separator.
459 toolbar_bounds.Inset(kClientEdgeThickness, 0); 457 toolbar_bounds.Inset(kClientEdgeThickness, 0);
460 BrowserView::Paint1pxHorizontalLine( 458 BrowserView::Paint1pxHorizontalLine(
461 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), 459 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR),
462 toolbar_bounds, true); 460 toolbar_bounds, true);
463 } 461 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698