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

Unified Diff: chrome/browser/android/vr_shell/ui_scene.cc

Issue 2705293002: Chrome VR clang-format cleanup (Closed)
Patch Set: Rebase to ToT. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.h ('k') | chrome/browser/android/vr_shell/ui_scene_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene.cc b/chrome/browser/android/vr_shell/ui_scene.cc
index a85fd877b54dc567a315c4226b8db79f0b301766..b2ecb39eae100f0b8f2c5854bac99be484530fee 100644
--- a/chrome/browser/android/vr_shell/ui_scene.cc
+++ b/chrome/browser/android/vr_shell/ui_scene.cc
@@ -153,8 +153,7 @@ bool ParseEndpointToFloats(Animation::Property property,
return false;
}
-std::unique_ptr<easing::Easing> ParseEasing(
- const base::DictionaryValue& dict) {
+std::unique_ptr<easing::Easing> ParseEasing(const base::DictionaryValue& dict) {
easing::EasingType easingType;
CHECK(dict.GetInteger("type", reinterpret_cast<int*>(&easingType)));
std::unique_ptr<easing::Easing> result;
@@ -189,8 +188,10 @@ std::unique_ptr<easing::Easing> ParseEasing(
return result;
}
-void ApplyAnchoring(const ContentRectangle& parent, XAnchoring x_anchoring,
- YAnchoring y_anchoring, ReversibleTransform* transform) {
+void ApplyAnchoring(const ContentRectangle& parent,
+ XAnchoring x_anchoring,
+ YAnchoring y_anchoring,
+ ReversibleTransform* transform) {
// To anchor a child, use the parent's size to find its edge.
float x_offset;
switch (x_anchoring) {
@@ -314,9 +315,8 @@ void UiScene::AddAnimationFromDict(const base::DictionaryValue& dict,
ContentRectangle* element = GetUiElementById(element_id);
CHECK_NE(element, nullptr);
element->animations.emplace_back(std::unique_ptr<Animation>(
- new Animation(
- animation_id, static_cast<Animation::Property>(property),
- std::move(easing), from, to, start, duration)));
+ new Animation(animation_id, static_cast<Animation::Property>(property),
+ std::move(easing), from, to, start, duration)));
}
void UiScene::RemoveAnimation(int element_id, int animation_id) {
@@ -410,8 +410,8 @@ float UiScene::GetBackgroundDistance() {
return background_distance_;
}
-const std::vector<std::unique_ptr<ContentRectangle>>&
-UiScene::GetUiElements() const {
+const std::vector<std::unique_ptr<ContentRectangle>>& UiScene::GetUiElements()
+ const {
return ui_elements_;
}
@@ -423,8 +423,8 @@ void UiScene::ApplyRecursiveTransforms(const ContentRectangle& element,
ReversibleTransform* transform,
float* opacity) {
transform->Scale(element.scale.x, element.scale.y, element.scale.z);
- transform->Rotate(element.rotation.x, element.rotation.y,
- element.rotation.z, element.rotation.angle);
+ transform->Rotate(element.rotation.x, element.rotation.y, element.rotation.z,
+ element.rotation.angle);
transform->Translate(element.translation.x, element.translation.y,
element.translation.z);
*opacity *= element.opacity;
@@ -439,7 +439,7 @@ void UiScene::ApplyRecursiveTransforms(const ContentRectangle& element,
}
void UiScene::ApplyDictToElement(const base::DictionaryValue& dict,
- ContentRectangle *element) {
+ ContentRectangle* element) {
int parent_id;
if (dict.GetInteger("parentId", &parent_id)) {
CHECK_GE(parent_id, 0);
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.h ('k') | chrome/browser/android/vr_shell/ui_scene_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698