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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 2119283002: Use container::back() and container::pop_back() for content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 } 831 }
832 832
833 void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) { 833 void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) {
834 root_layer_->InsertChild(layer, 0); 834 root_layer_->InsertChild(layer, 0);
835 root_layer_->SetIsDrawable(false); 835 root_layer_->SetIsDrawable(false);
836 } 836 }
837 837
838 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { 838 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) {
839 layer->RemoveFromParent(); 839 layer->RemoveFromParent();
840 840
841 if (!root_layer_->children().size()) 841 if (root_layer_->children().empty())
842 root_layer_->SetIsDrawable(true); 842 root_layer_->SetIsDrawable(true);
843 } 843 }
844 844
845 void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) { 845 void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) {
846 if (!web_contents_) 846 if (!web_contents_)
847 return; 847 return;
848 848
849 web_contents_->MoveRangeSelectionExtent(gfx::ToRoundedPoint(extent)); 849 web_contents_->MoveRangeSelectionExtent(gfx::ToRoundedPoint(extent));
850 } 850 }
851 851
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 return ScopedJavaLocalRef<jobject>(); 1642 return ScopedJavaLocalRef<jobject>();
1643 1643
1644 return view->GetJavaObject(); 1644 return view->GetJavaObject();
1645 } 1645 }
1646 1646
1647 bool RegisterContentViewCore(JNIEnv* env) { 1647 bool RegisterContentViewCore(JNIEnv* env) {
1648 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env); 1648 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env);
1649 } 1649 }
1650 1650
1651 } // namespace content 1651 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager.cc ('k') | content/browser/appcache/appcache_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698