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

Side by Side Diff: content/public/test/layouttest_support.h

Issue 298263002: Battery Status API: add testing support for LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 6 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_TEST_LAYOUTTEST_SUPPORT_H_ 5 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" 12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
13 13
14 namespace blink { 14 namespace blink {
15 class WebBatteryStatus;
15 class WebDeviceMotionData; 16 class WebDeviceMotionData;
16 class WebDeviceOrientationData; 17 class WebDeviceOrientationData;
17 class WebGamepad; 18 class WebGamepad;
18 class WebGamepads; 19 class WebGamepads;
19 struct WebSize; 20 struct WebSize;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
24 class PageState; 25 class PageState;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); 61 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data);
61 62
62 // Sets WebScreenOrientationType that should be used as a mock orientation. 63 // Sets WebScreenOrientationType that should be used as a mock orientation.
63 void SetMockScreenOrientation( 64 void SetMockScreenOrientation(
64 RenderView* render_view, 65 RenderView* render_view,
65 const blink::WebScreenOrientationType& orientation); 66 const blink::WebScreenOrientationType& orientation);
66 67
67 // Resets the mock screen orientation data. 68 // Resets the mock screen orientation data.
68 void ResetMockScreenOrientation(); 69 void ResetMockScreenOrientation();
69 70
71 // Notifies blink that battery status has changed.
72 void MockBatteryStatusChanged(const blink::WebBatteryStatus& status);
73
70 // Returns the length of the local session history of a render view. 74 // Returns the length of the local session history of a render view.
71 int GetLocalSessionHistoryLength(RenderView* render_view); 75 int GetLocalSessionHistoryLength(RenderView* render_view);
72 76
73 // Sync the current session history to the browser process. 77 // Sync the current session history to the browser process.
74 void SyncNavigationState(RenderView* render_view); 78 void SyncNavigationState(RenderView* render_view);
75 79
76 // Sets the focus of the render view depending on |enable|. This only overrides 80 // Sets the focus of the render view depending on |enable|. This only overrides
77 // the state of the renderer, and does not sync the focus to the browser 81 // the state of the renderer, and does not sync the focus to the browser
78 // process. 82 // process.
79 void SetFocusAndActivate(RenderView* render_view, bool enable); 83 void SetFocusAndActivate(RenderView* render_view, bool enable);
(...skipping 22 matching lines...) Expand all
102 void DisableAutoResizeMode(RenderView* render_view, 106 void DisableAutoResizeMode(RenderView* render_view,
103 const blink::WebSize& new_size); 107 const blink::WebSize& new_size);
104 108
105 // Provides a text dump of the contents of the given page state. 109 // Provides a text dump of the contents of the given page state.
106 std::string DumpBackForwardList(std::vector<PageState>& page_state, 110 std::string DumpBackForwardList(std::vector<PageState>& page_state,
107 size_t current_index); 111 size_t current_index);
108 112
109 } // namespace content 113 } // namespace content
110 114
111 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 115 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/battery_status/fake_battery_status_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698