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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 290733004: Don't spin the loading indicator for in-page navigations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "ui/views/controls/menu/menu_runner.h" 45 #include "ui/views/controls/menu/menu_runner.h"
46 #include "ui/views/widget/widget.h" 46 #include "ui/views/widget/widget.h"
47 47
48 using base::UserMetricsAction; 48 using base::UserMetricsAction;
49 using content::WebContents; 49 using content::WebContents;
50 50
51 namespace { 51 namespace {
52 52
53 TabRendererData::NetworkState TabContentsNetworkState( 53 TabRendererData::NetworkState TabContentsNetworkState(
54 WebContents* contents) { 54 WebContents* contents) {
55 if (!contents || !contents->IsLoading()) 55 if (!contents ||
56 !contents->IsLoading() ||
57 !contents->IsLoadToDifferentDocument()) {
56 return TabRendererData::NETWORK_STATE_NONE; 58 return TabRendererData::NETWORK_STATE_NONE;
59 }
60
57 if (contents->IsWaitingForResponse()) 61 if (contents->IsWaitingForResponse())
58 return TabRendererData::NETWORK_STATE_WAITING; 62 return TabRendererData::NETWORK_STATE_WAITING;
59 return TabRendererData::NETWORK_STATE_LOADING; 63 return TabRendererData::NETWORK_STATE_LOADING;
60 } 64 }
61 65
62 TabStripLayoutType DetermineTabStripLayout( 66 TabStripLayoutType DetermineTabStripLayout(
63 PrefService* prefs, 67 PrefService* prefs,
64 chrome::HostDesktopType host_desktop_type, 68 chrome::HostDesktopType host_desktop_type,
65 bool* adjust_layout) { 69 bool* adjust_layout) {
66 *adjust_layout = false; 70 *adjust_layout = false;
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 url, 592 url,
589 mime_type.empty() || 593 mime_type.empty() ||
590 net::IsSupportedMimeType(mime_type) || 594 net::IsSupportedMimeType(mime_type) ||
591 content::PluginService::GetInstance()->GetPluginInfo( 595 content::PluginService::GetInstance()->GetPluginInfo(
592 -1, // process ID 596 -1, // process ID
593 MSG_ROUTING_NONE, // routing ID 597 MSG_ROUTING_NONE, // routing ID
594 model_->profile()->GetResourceContext(), 598 model_->profile()->GetResourceContext(),
595 url, GURL(), mime_type, false, 599 url, GURL(), mime_type, false,
596 NULL, &plugin, NULL)); 600 NULL, &plugin, NULL));
597 } 601 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698