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

Side by Side Diff: components/html_viewer/html_widget.cc

Issue 1425263003: Use TimeTicks as much as possible in startup_metric_utils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef thread priority dance out on Mac per lack of support in base Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/html_viewer/html_widget.h" 5 #include "components/html_viewer/html_widget.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/html_viewer/blink_settings.h" 8 #include "components/html_viewer/blink_settings.h"
9 #include "components/html_viewer/global_state.h" 9 #include "components/html_viewer/global_state.h"
10 #include "components/html_viewer/ime_controller.h" 10 #include "components/html_viewer/ime_controller.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 blink::WebLayerTreeView* HTMLWidgetRootLocal::layerTreeView() { 121 blink::WebLayerTreeView* HTMLWidgetRootLocal::layerTreeView() {
122 return web_layer_tree_view_impl_.get(); 122 return web_layer_tree_view_impl_.get();
123 } 123 }
124 124
125 void HTMLWidgetRootLocal::didMeaningfulLayout( 125 void HTMLWidgetRootLocal::didMeaningfulLayout(
126 blink::WebMeaningfulLayout layout_type) { 126 blink::WebMeaningfulLayout layout_type) {
127 static bool called = false; 127 static bool called = false;
128 if (!called && layout_type == blink::WebMeaningfulLayout::VisuallyNonEmpty) { 128 if (!called && layout_type == blink::WebMeaningfulLayout::VisuallyNonEmpty) {
129 const int64 time = base::Time::Now().ToInternalValue(); 129 const int64 ticks = base::TimeTicks::Now().ToInternalValue();
130 tracing::StartupPerformanceDataCollectorPtr collector = 130 tracing::StartupPerformanceDataCollectorPtr collector =
131 StatsCollectionController::ConnectToDataCollector(app_); 131 StatsCollectionController::ConnectToDataCollector(app_);
132 if (collector) 132 if (collector)
133 collector->SetFirstVisuallyNonEmptyLayoutTime(time); 133 collector->SetFirstVisuallyNonEmptyLayoutTicks(ticks);
134 called = true; 134 called = true;
135 } 135 }
136 } 136 }
137 137
138 void HTMLWidgetRootLocal::resetInputMethod() { 138 void HTMLWidgetRootLocal::resetInputMethod() {
139 ime_controller_->ResetInputMethod(); 139 ime_controller_->ResetInputMethod();
140 } 140 }
141 141
142 void HTMLWidgetRootLocal::didHandleGestureEvent( 142 void HTMLWidgetRootLocal::didHandleGestureEvent(
143 const blink::WebGestureEvent& event, 143 const blink::WebGestureEvent& event,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { 215 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() {
216 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); 216 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput();
217 } 217 }
218 218
219 void HTMLWidgetLocalRoot::showImeIfNeeded() { 219 void HTMLWidgetLocalRoot::showImeIfNeeded() {
220 ime_controller_->ShowImeIfNeeded(); 220 ime_controller_->ShowImeIfNeeded();
221 } 221 }
222 222
223 } // namespace html_viewer 223 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698