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

Side by Side Diff: chrome/browser/ui/panels/panel_host.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
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/panels/panel_host.h" 5 #include "chrome/browser/ui/panels/panel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void PanelHost::ActivateContents(content::WebContents* contents) { 155 void PanelHost::ActivateContents(content::WebContents* contents) {
156 panel_->Activate(); 156 panel_->Activate();
157 } 157 }
158 158
159 void PanelHost::DeactivateContents(content::WebContents* contents) { 159 void PanelHost::DeactivateContents(content::WebContents* contents) {
160 panel_->Deactivate(); 160 panel_->Deactivate();
161 } 161 }
162 162
163 void PanelHost::LoadingStateChanged(content::WebContents* source) { 163 void PanelHost::LoadingStateChanged(content::WebContents* source,
164 bool is_loading = source->IsLoading(); 164 bool to_different_document) {
165 bool is_loading = source->IsLoading() && to_different_document;
165 panel_->LoadingStateChanged(is_loading); 166 panel_->LoadingStateChanged(is_loading);
166 } 167 }
167 168
168 void PanelHost::CloseContents(content::WebContents* source) { 169 void PanelHost::CloseContents(content::WebContents* source) {
169 panel_->Close(); 170 panel_->Close();
170 } 171 }
171 172
172 void PanelHost::MoveContents(content::WebContents* source, 173 void PanelHost::MoveContents(content::WebContents* source,
173 const gfx::Rect& pos) { 174 const gfx::Rect& pos) {
174 panel_->SetBounds(pos); 175 panel_->SetBounds(pos);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 260 }
260 261
261 void PanelHost::StopLoading() { 262 void PanelHost::StopLoading() {
262 content::RecordAction(UserMetricsAction("Stop")); 263 content::RecordAction(UserMetricsAction("Stop"));
263 web_contents_->Stop(); 264 web_contents_->Stop();
264 } 265 }
265 266
266 void PanelHost::Zoom(content::PageZoom zoom) { 267 void PanelHost::Zoom(content::PageZoom zoom) {
267 chrome_page_zoom::Zoom(web_contents_.get(), zoom); 268 chrome_page_zoom::Zoom(web_contents_.get(), zoom);
268 } 269 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_host.h ('k') | chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698