| OLD | NEW |
| 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 Loading... |
| 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 || !contents->IsLoadingToDifferentDocument()) |
| 56 return TabRendererData::NETWORK_STATE_NONE; | 56 return TabRendererData::NETWORK_STATE_NONE; |
| 57 if (contents->IsWaitingForResponse()) | 57 if (contents->IsWaitingForResponse()) |
| 58 return TabRendererData::NETWORK_STATE_WAITING; | 58 return TabRendererData::NETWORK_STATE_WAITING; |
| 59 return TabRendererData::NETWORK_STATE_LOADING; | 59 return TabRendererData::NETWORK_STATE_LOADING; |
| 60 } | 60 } |
| 61 | 61 |
| 62 TabStripLayoutType DetermineTabStripLayout( | 62 TabStripLayoutType DetermineTabStripLayout( |
| 63 PrefService* prefs, | 63 PrefService* prefs, |
| 64 chrome::HostDesktopType host_desktop_type, | 64 chrome::HostDesktopType host_desktop_type, |
| 65 bool* adjust_layout) { | 65 bool* adjust_layout) { |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 url, | 588 url, |
| 589 mime_type.empty() || | 589 mime_type.empty() || |
| 590 net::IsSupportedMimeType(mime_type) || | 590 net::IsSupportedMimeType(mime_type) || |
| 591 content::PluginService::GetInstance()->GetPluginInfo( | 591 content::PluginService::GetInstance()->GetPluginInfo( |
| 592 -1, // process ID | 592 -1, // process ID |
| 593 MSG_ROUTING_NONE, // routing ID | 593 MSG_ROUTING_NONE, // routing ID |
| 594 model_->profile()->GetResourceContext(), | 594 model_->profile()->GetResourceContext(), |
| 595 url, GURL(), mime_type, false, | 595 url, GURL(), mime_type, false, |
| 596 NULL, &plugin, NULL)); | 596 NULL, &plugin, NULL)); |
| 597 } | 597 } |
| OLD | NEW |