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

Side by Side Diff: content/public/browser/android/content_view_core.h

Issue 527073002: Extract method: CreateDelegatedLayerForFrameProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/navigation_controller.h" 13 #include "content/public/browser/navigation_controller.h"
14 #include "third_party/skia/include/core/SkImageInfo.h" 14 #include "third_party/skia/include/core/SkImageInfo.h"
15 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
16 16
17 class SkBitmap; 17 class SkBitmap;
18 18
19 namespace cc { 19 namespace cc {
20 class DelegatedRendererLayer;
20 class Layer; 21 class Layer;
21 } 22 }
22 23
23 namespace gfx { 24 namespace gfx {
24 class Size; 25 class Size;
25 class SizeF; 26 class SizeF;
26 class Vector2dF; 27 class Vector2dF;
27 } 28 }
28 29
29 namespace ui { 30 namespace ui {
(...skipping 22 matching lines...) Expand all
52 virtual void ShowPastePopup(int x, int y) = 0; 53 virtual void ShowPastePopup(int x, int y) = 0;
53 54
54 // Request a scaled content readback. The result is passed through the 55 // Request a scaled content readback. The result is passed through the
55 // callback. The boolean parameter indicates whether the readback was a 56 // callback. The boolean parameter indicates whether the readback was a
56 // success or not. The content is passed through the SkBitmap parameter. 57 // success or not. The content is passed through the SkBitmap parameter.
57 virtual void GetScaledContentBitmap( 58 virtual void GetScaledContentBitmap(
58 float scale, 59 float scale,
59 SkColorType color_type, 60 SkColorType color_type,
60 gfx::Rect src_rect, 61 gfx::Rect src_rect,
61 const base::Callback<void(bool, const SkBitmap&)>& result_callback) = 0; 62 const base::Callback<void(bool, const SkBitmap&)>& result_callback) = 0;
63 virtual scoped_refptr<cc::DelegatedRendererLayer>
64 CreateDelegatedLayerForFrameProvider() = 0;
62 virtual float GetDpiScale() const = 0; 65 virtual float GetDpiScale() const = 0;
63 virtual void PauseVideo() = 0; 66 virtual void PauseVideo() = 0;
64 virtual void PauseOrResumeGeolocation(bool should_pause) = 0; 67 virtual void PauseOrResumeGeolocation(bool should_pause) = 0;
65 68
66 // Observer callback for frame metadata updates. 69 // Observer callback for frame metadata updates.
67 typedef base::Callback<void( 70 typedef base::Callback<void(
68 const gfx::SizeF& content_size, 71 const gfx::SizeF& content_size,
69 const gfx::Vector2dF& scroll_offset, 72 const gfx::Vector2dF& scroll_offset,
70 float page_scale_factor)> UpdateFrameInfoCallback; 73 float page_scale_factor)> UpdateFrameInfoCallback;
71 74
72 // Text surrounding selection. 75 // Text surrounding selection.
73 virtual void RequestTextSurroundingSelection( 76 virtual void RequestTextSurroundingSelection(
74 int max_length, 77 int max_length,
75 const base::Callback<void(const base::string16& content, 78 const base::Callback<void(const base::string16& content,
76 int start_offset, 79 int start_offset,
77 int end_offset)>& callback) = 0; 80 int end_offset)>& callback) = 0;
78 81
79 protected: 82 protected:
80 virtual ~ContentViewCore() {}; 83 virtual ~ContentViewCore() {};
81 }; 84 };
82 85
83 }; // namespace content 86 }; // namespace content
84 87
85 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 88 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698