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

Side by Side Diff: ash/wm/resize_handle_window_targeter.cc

Issue 149303003: [Refactor] Move the logic to update bounds for show type from WorkspaceLayoutManager to DefaultState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: handle show_inactive Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/resize_handle_window_targeter.h ('k') | ash/wm/toplevel_window_event_handler.cc » ('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 "ash/wm/resize_handle_window_targeter.h" 5 #include "ash/wm/resize_handle_window_targeter.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/wm/immersive_fullscreen_controller.h" 8 #include "ash/wm/immersive_fullscreen_controller.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 ResizeHandleWindowTargeter::ResizeHandleWindowTargeter( 14 ResizeHandleWindowTargeter::ResizeHandleWindowTargeter(
15 aura::Window* window, 15 aura::Window* window,
16 ImmersiveFullscreenController* controller) 16 ImmersiveFullscreenController* controller)
17 : window_(window), 17 : window_(window),
18 immersive_controller_(controller) { 18 immersive_controller_(controller) {
19 wm::WindowState* window_state = wm::GetWindowState(window_); 19 wm::WindowState* window_state = wm::GetWindowState(window_);
20 OnWindowShowTypeChanged(window_state, wm::SHOW_TYPE_DEFAULT); 20 OnPostWindowShowTypeChange(window_state, wm::SHOW_TYPE_DEFAULT);
21 window_state->AddObserver(this); 21 window_state->AddObserver(this);
22 window_->AddObserver(this); 22 window_->AddObserver(this);
23 } 23 }
24 24
25 ResizeHandleWindowTargeter::~ResizeHandleWindowTargeter() { 25 ResizeHandleWindowTargeter::~ResizeHandleWindowTargeter() {
26 if (window_) { 26 if (window_) {
27 window_->RemoveObserver(this); 27 window_->RemoveObserver(this);
28 wm::GetWindowState(window_)->RemoveObserver(this); 28 wm::GetWindowState(window_)->RemoveObserver(this);
29 } 29 }
30 } 30 }
31 31
32 void ResizeHandleWindowTargeter::OnWindowShowTypeChanged( 32 void ResizeHandleWindowTargeter::OnPostWindowShowTypeChange(
33 wm::WindowState* window_state, 33 wm::WindowState* window_state,
34 wm::WindowShowType old_type) { 34 wm::WindowShowType old_type) {
35 if (window_state->IsMaximizedOrFullscreen()) { 35 if (window_state->IsMaximizedOrFullscreen()) {
36 frame_border_inset_ = gfx::Insets(); 36 frame_border_inset_ = gfx::Insets();
37 } else { 37 } else {
38 frame_border_inset_ = gfx::Insets(kResizeInsideBoundsSize, 38 frame_border_inset_ = gfx::Insets(kResizeInsideBoundsSize,
39 kResizeInsideBoundsSize, 39 kResizeInsideBoundsSize,
40 kResizeInsideBoundsSize, 40 kResizeInsideBoundsSize,
41 kResizeInsideBoundsSize); 41 kResizeInsideBoundsSize);
42 } 42 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (parent) { 90 if (parent) {
91 ui::EventTargeter* targeter = parent->GetEventTargeter(); 91 ui::EventTargeter* targeter = parent->GetEventTargeter();
92 if (targeter) 92 if (targeter)
93 return targeter->SubtreeShouldBeExploredForEvent(target, event); 93 return targeter->SubtreeShouldBeExploredForEvent(target, event);
94 } 94 }
95 } 95 }
96 return aura::WindowTargeter::SubtreeShouldBeExploredForEvent(target, event); 96 return aura::WindowTargeter::SubtreeShouldBeExploredForEvent(target, event);
97 } 97 }
98 98
99 } // namespace ash 99 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/resize_handle_window_targeter.h ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698