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

Side by Side Diff: content/browser/web_contents/aura/overscroll_layer_wrapper.cc

Issue 895543005: Refactor GestureNavigation to eliminate code redundancy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Mikhail's comments Created 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/web_contents/aura/overscroll_layer_wrapper.h"
6
7 #include "ui/aura/window.h"
8 #include "ui/compositor/layer.h"
9
10 namespace content {
11
12 OverscrollLayerWrapper::OverscrollLayerWrapper(scoped_ptr<aura::Window> window)
13 : layer_(nullptr),
14 window_(window.Pass()) {
15 }
16
17 OverscrollLayerWrapper::OverscrollLayerWrapper(scoped_ptr<ui::Layer> layer)
18 : layer_(layer.Pass()),
19 window_(nullptr) {
20 }
21
22 OverscrollLayerWrapper::~OverscrollLayerWrapper() {
23 }
24
25 scoped_ptr<ui::Layer> OverscrollLayerWrapper::AcquireLayer() {
26 return layer_.Pass();
27 }
28
29 scoped_ptr<aura::Window> OverscrollLayerWrapper::AcquireWindow() {
30 return window_.Pass();
31 }
32
33 gfx::Rect OverscrollLayerWrapper::GetBounds() {
34 if (layer_)
35 return layer_->bounds();
36 DCHECK(window_);
37 return window_->bounds();
38 }
39
40 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698