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

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 1285373002: Ensure that Service Worker clients are always returned in MRU order (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inconsistencies. Created 5 years, 4 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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 RenderFrameHostImpl* FrameTree::GetMainFrame() const { 250 RenderFrameHostImpl* FrameTree::GetMainFrame() const {
251 return root_->current_frame_host(); 251 return root_->current_frame_host();
252 } 252 }
253 253
254 FrameTreeNode* FrameTree::GetFocusedFrame() { 254 FrameTreeNode* FrameTree::GetFocusedFrame() {
255 return FindByID(focused_frame_tree_node_id_); 255 return FindByID(focused_frame_tree_node_id_);
256 } 256 }
257 257
258 void FrameTree::SetFocusedFrame(FrameTreeNode* node) { 258 void FrameTree::SetFocusedFrame(FrameTreeNode* node) {
259 node->set_last_focus_time(base::TimeTicks::Now());
259 focused_frame_tree_node_id_ = node->frame_tree_node_id(); 260 focused_frame_tree_node_id_ = node->frame_tree_node_id();
260 } 261 }
261 262
262 void FrameTree::SetFrameRemoveListener( 263 void FrameTree::SetFrameRemoveListener(
263 const base::Callback<void(RenderFrameHost*)>& on_frame_removed) { 264 const base::Callback<void(RenderFrameHost*)>& on_frame_removed) {
264 on_frame_removed_ = on_frame_removed; 265 on_frame_removed_ = on_frame_removed;
265 } 266 }
266 267
267 RenderViewHostImpl* FrameTree::CreateRenderViewHost(SiteInstance* site_instance, 268 RenderViewHostImpl* FrameTree::CreateRenderViewHost(SiteInstance* site_instance,
268 int routing_id, 269 int routing_id,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 load_progress_ = 0.0; 397 load_progress_ = 0.0;
397 } 398 }
398 399
399 bool FrameTree::IsLoading() { 400 bool FrameTree::IsLoading() {
400 bool is_loading = false; 401 bool is_loading = false;
401 ForEach(base::Bind(&IsNodeLoading, &is_loading)); 402 ForEach(base::Bind(&IsNodeLoading, &is_loading));
402 return is_loading; 403 return is_loading;
403 } 404 }
404 405
405 } // namespace content 406 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698