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

Side by Side Diff: chrome/browser/chromeos/login/simple_web_view_dialog.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: Rebase 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
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/chromeos/login/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 } 257 }
258 258
259 content::WebContents* SimpleWebViewDialog::OpenURL( 259 content::WebContents* SimpleWebViewDialog::OpenURL(
260 const content::OpenURLParams& params) { 260 const content::OpenURLParams& params) {
261 // As there are no Browsers right now, this could not actually ever work. 261 // As there are no Browsers right now, this could not actually ever work.
262 NOTIMPLEMENTED(); 262 NOTIMPLEMENTED();
263 return NULL; 263 return NULL;
264 } 264 }
265 265
266 void SimpleWebViewDialog::LoadingStateChanged(WebContents* source) { 266 void SimpleWebViewDialog::LoadingStateChanged(WebContents* source,
267 bool to_different_document) {
267 bool is_loading = source->IsLoading(); 268 bool is_loading = source->IsLoading();
268 UpdateReload(is_loading, false); 269 UpdateReload(is_loading && to_different_document, false);
269 command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading); 270 command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading);
270 } 271 }
271 272
272 WebContents* SimpleWebViewDialog::GetWebContents() { 273 WebContents* SimpleWebViewDialog::GetWebContents() {
273 return NULL; 274 return NULL;
274 } 275 }
275 276
276 ToolbarModel* SimpleWebViewDialog::GetToolbarModel() { 277 ToolbarModel* SimpleWebViewDialog::GetToolbarModel() {
277 return toolbar_model_.get(); 278 return toolbar_model_.get();
278 } 279 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 385
385 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 386 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
386 if (reload_) { 387 if (reload_) {
387 reload_->ChangeMode( 388 reload_->ChangeMode(
388 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 389 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
389 force); 390 force);
390 } 391 }
391 } 392 }
392 393
393 } // namespace chromeos 394 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698