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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/task_runner_util.h" | 9 #include "base/task_runner_util.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "content/public/browser/plugin_service.h" | 38 #include "content/public/browser/plugin_service.h" |
39 #include "content/public/browser/user_metrics.h" | 39 #include "content/public/browser/user_metrics.h" |
40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
41 #include "content/public/common/webplugininfo.h" | 41 #include "content/public/common/webplugininfo.h" |
42 #include "ipc/ipc_message.h" | 42 #include "ipc/ipc_message.h" |
43 #include "net/base/filename_util.h" | 43 #include "net/base/filename_util.h" |
44 #include "ui/base/models/list_selection_model.h" | 44 #include "ui/base/models/list_selection_model.h" |
45 #include "ui/gfx/image/image.h" | 45 #include "ui/gfx/image/image.h" |
46 #include "ui/views/controls/menu/menu_runner.h" | 46 #include "ui/views/controls/menu/menu_runner.h" |
47 #include "ui/views/widget/widget.h" | 47 #include "ui/views/widget/widget.h" |
| 48 #include "url/origin.h" |
48 | 49 |
49 using base::UserMetricsAction; | 50 using base::UserMetricsAction; |
50 using content::WebContents; | 51 using content::WebContents; |
51 | 52 |
52 namespace { | 53 namespace { |
53 | 54 |
54 TabRendererData::NetworkState TabContentsNetworkState( | 55 TabRendererData::NetworkState TabContentsNetworkState( |
55 WebContents* contents) { | 56 WebContents* contents) { |
56 if (!contents || !contents->IsLoadingToDifferentDocument()) | 57 if (!contents || !contents->IsLoadingToDifferentDocument()) |
57 return TabRendererData::NETWORK_STATE_NONE; | 58 return TabRendererData::NETWORK_STATE_NONE; |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 // there is a plugin that supports the mime type (e.g. PDF). | 568 // there is a plugin that supports the mime type (e.g. PDF). |
568 // TODO(bauerb): This possibly uses stale information, but it's guaranteed not | 569 // TODO(bauerb): This possibly uses stale information, but it's guaranteed not |
569 // to do disk access. | 570 // to do disk access. |
570 content::WebPluginInfo plugin; | 571 content::WebPluginInfo plugin; |
571 tabstrip_->FileSupported( | 572 tabstrip_->FileSupported( |
572 url, | 573 url, |
573 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || | 574 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || |
574 content::PluginService::GetInstance()->GetPluginInfo( | 575 content::PluginService::GetInstance()->GetPluginInfo( |
575 -1, // process ID | 576 -1, // process ID |
576 MSG_ROUTING_NONE, // routing ID | 577 MSG_ROUTING_NONE, // routing ID |
577 model_->profile()->GetResourceContext(), url, GURL(), mime_type, | 578 model_->profile()->GetResourceContext(), url, url::Origin(), |
578 false, NULL, &plugin, NULL)); | 579 mime_type, false, NULL, &plugin, NULL)); |
579 } | 580 } |
OLD | NEW |