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

Side by Side Diff: ash/mus/non_client_frame_controller.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: win Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ash/mus/non_client_frame_controller.h" 5 #include "ash/mus/non_client_frame_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 views::NativeWidgetMus::InitNativeWidget(params); 250 views::NativeWidgetMus::InitNativeWidget(params);
251 aura::WindowTreeHost* window_tree_host = GetNativeView()->GetHost(); 251 aura::WindowTreeHost* window_tree_host = GetNativeView()->GetHost();
252 // TODO(sky): shadow should be determined by window type and shadow type. 252 // TODO(sky): shadow should be determined by window type and shadow type.
253 shadow_.reset(new Shadow); 253 shadow_.reset(new Shadow);
254 shadow_->Init(Shadow::STYLE_INACTIVE); 254 shadow_->Init(Shadow::STYLE_INACTIVE);
255 shadow_->Install(window()); 255 shadow_->Install(window());
256 ContentWindowLayoutManager* layout_manager = new ContentWindowLayoutManager( 256 ContentWindowLayoutManager* layout_manager = new ContentWindowLayoutManager(
257 window_tree_host->window(), shadow_.get()); 257 window_tree_host->window(), shadow_.get());
258 window_tree_host->window()->SetLayoutManager(layout_manager); 258 window_tree_host->window()->SetLayoutManager(layout_manager);
259 const int inset = Shadow::GetInteriorInsetForStyle(Shadow::STYLE_ACTIVE); 259 const int inset = Shadow::GetInteriorInsetForStyle(Shadow::STYLE_ACTIVE);
260 window_tree_host->SetOutputSurfacePadding( 260 window_tree_host->SetOutputSurfacePaddingInPixels(
261 gfx::Insets(inset, inset, inset, inset)); 261 gfx::Insets(inset, inset, inset, inset));
262 window_tree_host->window()->layer()->Add(shadow_->layer()); 262 window_tree_host->window()->layer()->Add(shadow_->layer());
263 shadow_->layer()->parent()->StackAtBottom(shadow_->layer()); 263 shadow_->layer()->parent()->StackAtBottom(shadow_->layer());
264 } 264 }
265 265
266 private: 266 private:
267 // The shadow, may be null. 267 // The shadow, may be null.
268 std::unique_ptr<Shadow> shadow_; 268 std::unique_ptr<Shadow> shadow_;
269 269
270 std::unique_ptr<MoveEventHandler> move_event_handler_; 270 std::unique_ptr<MoveEventHandler> move_event_handler_;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 } 460 }
461 461
462 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) { 462 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) {
463 window_->RemoveObserver(this); 463 window_->RemoveObserver(this);
464 window_ = nullptr; 464 window_ = nullptr;
465 } 465 }
466 466
467 } // namespace mus 467 } // namespace mus
468 } // namespace ash 468 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698