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

Side by Side Diff: blimp/client/public/contents/blimp_contents_view.h

Issue 2504793002: Scale bounds in DesktopWindowTreeHostMus and in calls to SetBounds. (Closed)
Patch Set: blimp Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_
6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_ 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
(...skipping 25 matching lines...) Expand all
36 // Returns the platform specific NativeView that represents the contents of 36 // Returns the platform specific NativeView that represents the contents of
37 // this BlimpContents. 37 // this BlimpContents.
38 virtual gfx::NativeView GetNativeView() = 0; 38 virtual gfx::NativeView GetNativeView() = 0;
39 39
40 // Returns the CC Layer that represents the contents of this BlimpContents. 40 // Returns the CC Layer that represents the contents of this BlimpContents.
41 // This can be used instead of |GetNativeView()| if only the CC Layer is 41 // This can be used instead of |GetNativeView()| if only the CC Layer is
42 // required. 42 // required.
43 virtual scoped_refptr<cc::Layer> GetLayer() = 0; 43 virtual scoped_refptr<cc::Layer> GetLayer() = 0;
44 44
45 // Called to set both the size and the scale of the BlimpContents. |size| is 45 // Called to set both the size and the scale of the BlimpContents. |size| is
46 // in pixels and |device_scale_factor| is in terms of dp to px. 46 // in pixels and |device_scale_factor| is in terms of px to dp.
David Trainor- moved to gerrit 2016/11/21 16:56:52 D'oh thanks! :)
47 virtual void SetSizeAndScale(const gfx::Size& size, 47 virtual void SetSizeAndScale(const gfx::Size& size,
48 float device_scale_factor) = 0; 48 float device_scale_factor) = 0;
49 49
50 // Called to pass a ui::MotionEvent to the BlimpContents. Returns whether or 50 // Called to pass a ui::MotionEvent to the BlimpContents. Returns whether or
51 // not |motion_event| was handled. 51 // not |motion_event| was handled.
52 virtual bool OnTouchEvent(const ui::MotionEvent& motion_event) = 0; 52 virtual bool OnTouchEvent(const ui::MotionEvent& motion_event) = 0;
53 53
54 // Copies the current visible content from the BlimpContents and returns a 54 // Copies the current visible content from the BlimpContents and returns a
55 // SkBitmap through |callback|. If the readback fails |nullptr| is returned 55 // SkBitmap through |callback|. If the readback fails |nullptr| is returned
56 // instead. 56 // instead.
57 virtual void CopyFromCompositingSurface( 57 virtual void CopyFromCompositingSurface(
58 const ReadbackRequestCallback& callback) = 0; 58 const ReadbackRequestCallback& callback) = 0;
59 59
60 protected: 60 protected:
61 BlimpContentsView() = default; 61 BlimpContentsView() = default;
62 62
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(BlimpContentsView); 64 DISALLOW_COPY_AND_ASSIGN(BlimpContentsView);
65 }; 65 };
66 66
67 } // namespace client 67 } // namespace client
68 } // namespace blimp 68 } // namespace blimp
69 69
70 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_ 70 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698