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

Unified Diff: mash/wm/non_client_frame_controller.cc

Issue 2024993002: Makes RootWindowController window creation in terms of common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/wm/bridge/wm_window_mus.cc ('k') | mash/wm/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/non_client_frame_controller.cc
diff --git a/mash/wm/non_client_frame_controller.cc b/mash/wm/non_client_frame_controller.cc
index adcc36d01f1bb540ef6946dd7a4e82b77f40e575..06900f2fa54e40ddbf59ab809fad07a42ba44e77 100644
--- a/mash/wm/non_client_frame_controller.cc
+++ b/mash/wm/non_client_frame_controller.cc
@@ -203,8 +203,8 @@ NonClientFrameController::NonClientFrameController(
mus::Window* window,
mus::WindowManagerClient* window_manager_client)
: widget_(new views::Widget), window_(window) {
- WmWindowMus::Get(window)->set_widget(
- widget_, WmWindowMus::WidgetCreationType::FOR_CLIENT);
+ WmWindowMus* wm_window = WmWindowMus::Get(window);
+ wm_window->set_widget(widget_, WmWindowMus::WidgetCreationType::FOR_CLIENT);
window_->AddObserver(this);
// To simplify things this code creates a Widget. While a Widget is created
@@ -225,9 +225,12 @@ NonClientFrameController::NonClientFrameController(
const int shadow_inset =
Shadow::GetInteriorInsetForStyle(Shadow::STYLE_ACTIVE);
+ const gfx::Insets extended_hit_region =
+ wm_window->ShouldUseExtendedHitRegion()
+ ? FrameBorderHitTestController::GetResizeOutsideBoundsSize()
+ : gfx::Insets();
window_manager_client->SetUnderlaySurfaceOffsetAndExtendedHitArea(
- window, gfx::Vector2d(shadow_inset, shadow_inset),
- FrameBorderHitTestController::GetResizeOutsideBoundsSize());
+ window, gfx::Vector2d(shadow_inset, shadow_inset), extended_hit_region);
}
NonClientFrameController::~NonClientFrameController() {
« no previous file with comments | « mash/wm/bridge/wm_window_mus.cc ('k') | mash/wm/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698