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

Side by Side Diff: ui/compositor/layer.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 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 #include "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 void Layer::SetForceRenderSurface(bool force) { 801 void Layer::SetForceRenderSurface(bool force) {
802 if (force_render_surface_ == force) 802 if (force_render_surface_ == force)
803 return; 803 return;
804 804
805 force_render_surface_ = force; 805 force_render_surface_ = force;
806 cc_layer_->SetForceRenderSurface(force_render_surface_); 806 cc_layer_->SetForceRenderSurface(force_render_surface_);
807 } 807 }
808 808
809 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { 809 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat {
810 public: 810 public:
811 explicit LayerDebugInfo(std::string name) : name_(name) { } 811 explicit LayerDebugInfo(const std::string& name) : name_(name) {}
812 void AppendAsTraceFormat(std::string* out) const override { 812 void AppendAsTraceFormat(std::string* out) const override {
813 base::DictionaryValue dictionary; 813 base::DictionaryValue dictionary;
814 dictionary.SetString("layer_name", name_); 814 dictionary.SetString("layer_name", name_);
815 base::JSONWriter::Write(dictionary, out); 815 base::JSONWriter::Write(dictionary, out);
816 } 816 }
817 817
818 private: 818 private:
819 ~LayerDebugInfo() override {} 819 ~LayerDebugInfo() override {}
820 std::string name_; 820 std::string name_;
821 }; 821 };
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 children_.end(), 1106 children_.end(),
1107 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), 1107 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection),
1108 collection)); 1108 collection));
1109 } 1109 }
1110 1110
1111 bool Layer::IsAnimating() const { 1111 bool Layer::IsAnimating() const {
1112 return animator_.get() && animator_->is_animating(); 1112 return animator_.get() && animator_->is_animating();
1113 } 1113 }
1114 1114
1115 } // namespace ui 1115 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_node_data.cc ('k') | url/gurl.h » ('j') | url/gurl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698