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

Side by Side Diff: ash/wm/immersive_fullscreen_controller.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "ash/common/ash_constants.h" 9 #include "ash/common/ash_constants.h"
10 #include "ash/common/wm/immersive/wm_immersive_fullscreen_controller_delegate.h"
10 #include "ash/common/wm/window_state.h" 11 #include "ash/common/wm/window_state.h"
11 #include "ash/shell.h" 12 #include "ash/shell.h"
12 #include "ash/wm/resize_handle_window_targeter.h" 13 #include "ash/wm/resize_handle_window_targeter.h"
13 #include "ash/wm/window_state_aura.h" 14 #include "ash/wm/window_state_aura.h"
14 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
15 #include "ui/aura/client/aura_constants.h" 16 #include "ui/aura/client/aura_constants.h"
16 #include "ui/aura/client/capture_client.h" 17 #include "ui/aura/client/capture_client.h"
17 #include "ui/aura/client/cursor_client.h" 18 #include "ui/aura/client/cursor_client.h"
18 #include "ui/aura/client/screen_position_client.h" 19 #include "ui/aura/client/screen_position_client.h"
19 #include "ui/aura/env.h" 20 #include "ui/aura/env.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 mouse_x_when_hit_top_in_screen_(-1), 249 mouse_x_when_hit_top_in_screen_(-1),
249 gesture_begun_(false), 250 gesture_begun_(false),
250 animation_(new gfx::SlideAnimation(this)), 251 animation_(new gfx::SlideAnimation(this)),
251 animations_disabled_for_test_(false), 252 animations_disabled_for_test_(false),
252 weak_ptr_factory_(this) {} 253 weak_ptr_factory_(this) {}
253 254
254 ImmersiveFullscreenController::~ImmersiveFullscreenController() { 255 ImmersiveFullscreenController::~ImmersiveFullscreenController() {
255 EnableWindowObservers(false); 256 EnableWindowObservers(false);
256 } 257 }
257 258
258 void ImmersiveFullscreenController::Init(Delegate* delegate, 259 void ImmersiveFullscreenController::Init(
259 views::Widget* widget, 260 WmImmersiveFullscreenControllerDelegate* delegate,
260 views::View* top_container) { 261 views::Widget* widget,
262 views::View* top_container) {
261 delegate_ = delegate; 263 delegate_ = delegate;
262 top_container_ = top_container; 264 top_container_ = top_container;
263 widget_ = widget; 265 widget_ = widget;
264 native_window_ = widget_->GetNativeWindow(); 266 native_window_ = widget_->GetNativeWindow();
265 native_window_->SetEventTargeter(std::unique_ptr<ui::EventTargeter>( 267 native_window_->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
266 new ResizeHandleWindowTargeter(native_window_, this))); 268 new ResizeHandleWindowTargeter(native_window_, this)));
267 } 269 }
268 270
269 void ImmersiveFullscreenController::SetEnabled(WindowType window_type, 271 void ImmersiveFullscreenController::SetEnabled(WindowType window_type,
270 bool enabled) { 272 bool enabled) {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 ::wm::GetTransientChildren(native_window_); 934 ::wm::GetTransientChildren(native_window_);
933 for (size_t i = 0; i < transient_children.size(); ++i) { 935 for (size_t i = 0; i < transient_children.size(); ++i) {
934 aura::Window* transient_child = transient_children[i]; 936 aura::Window* transient_child = transient_children[i];
935 views::View* anchor_view = GetAnchorView(transient_child); 937 views::View* anchor_view = GetAnchorView(transient_child);
936 if (anchor_view && top_container_->Contains(anchor_view)) 938 if (anchor_view && top_container_->Contains(anchor_view))
937 bubble_observer_->StartObserving(transient_child); 939 bubble_observer_->StartObserving(transient_child);
938 } 940 }
939 } 941 }
940 942
941 } // namespace ash 943 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.h ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698