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

Side by Side Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/web_dialog_window_controller.mm » ('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 (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 "chrome/browser/ui/browser_tab_strip_model_delegate.h" 5 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // the first web contents to be marked as active. 70 // the first web contents to be marked as active.
71 if (i == 0) 71 if (i == 0)
72 item.add_types |= TabStripModel::ADD_ACTIVE; 72 item.add_types |= TabStripModel::ADD_ACTIVE;
73 73
74 new_model->InsertWebContentsAt( 74 new_model->InsertWebContentsAt(
75 static_cast<int>(i), item.web_contents, item.add_types); 75 static_cast<int>(i), item.web_contents, item.add_types);
76 // Make sure the loading state is updated correctly, otherwise the throbber 76 // Make sure the loading state is updated correctly, otherwise the throbber
77 // won't start if the page is loading. 77 // won't start if the page is loading.
78 // TODO(beng): find a better way of doing this. 78 // TODO(beng): find a better way of doing this.
79 static_cast<content::WebContentsDelegate*>(browser)-> 79 static_cast<content::WebContentsDelegate*>(browser)->
80 LoadingStateChanged(item.web_contents); 80 LoadingStateChanged(item.web_contents, true);
81 } 81 }
82 82
83 return browser; 83 return browser;
84 } 84 }
85 85
86 void BrowserTabStripModelDelegate::WillAddWebContents( 86 void BrowserTabStripModelDelegate::WillAddWebContents(
87 content::WebContents* contents) { 87 content::WebContents* contents) {
88 TabHelpers::AttachTabHelpers(contents); 88 TabHelpers::AttachTabHelpers(contents);
89 } 89 }
90 90
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 //////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////
171 // BrowserTabStripModelDelegate, private: 171 // BrowserTabStripModelDelegate, private:
172 172
173 void BrowserTabStripModelDelegate::CloseFrame() { 173 void BrowserTabStripModelDelegate::CloseFrame() {
174 browser_->window()->Close(); 174 browser_->window()->Close();
175 } 175 }
176 176
177 } // namespace chrome 177 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/web_dialog_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698