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

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

Issue 1110833003: Move the IsSupported* mime functions out of //net and into //components/mime_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prefs/pref_service.h" 8 #include "base/prefs/pref_service.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 12 matching lines...) Expand all
23 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
24 #include "chrome/browser/ui/tabs/tab_utils.h" 24 #include "chrome/browser/ui/tabs/tab_utils.h"
25 #include "chrome/browser/ui/views/frame/browser_view.h" 25 #include "chrome/browser/ui/views/frame/browser_view.h"
26 #include "chrome/browser/ui/views/tabs/tab.h" 26 #include "chrome/browser/ui/views/tabs/tab.h"
27 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" 27 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
28 #include "chrome/browser/ui/views/tabs/tab_strip.h" 28 #include "chrome/browser/ui/views/tabs/tab_strip.h"
29 #include "chrome/common/pref_names.h" 29 #include "chrome/common/pref_names.h"
30 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
31 #include "components/favicon/content/content_favicon_driver.h" 31 #include "components/favicon/content/content_favicon_driver.h"
32 #include "components/metrics/proto/omnibox_event.pb.h" 32 #include "components/metrics/proto/omnibox_event.pb.h"
33 #include "components/mime_util/mime_util.h"
33 #include "components/omnibox/autocomplete_match.h" 34 #include "components/omnibox/autocomplete_match.h"
34 #include "content/public/browser/browser_thread.h" 35 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/notification_service.h" 36 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/plugin_service.h" 37 #include "content/public/browser/plugin_service.h"
37 #include "content/public/browser/user_metrics.h" 38 #include "content/public/browser/user_metrics.h"
38 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
39 #include "content/public/common/webplugininfo.h" 40 #include "content/public/common/webplugininfo.h"
40 #include "ipc/ipc_message.h" 41 #include "ipc/ipc_message.h"
41 #include "net/base/filename_util.h" 42 #include "net/base/filename_util.h"
42 #include "ui/base/models/list_selection_model.h" 43 #include "ui/base/models/list_selection_model.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 void BrowserTabStripController::OnFindURLMimeTypeCompleted( 575 void BrowserTabStripController::OnFindURLMimeTypeCompleted(
575 const GURL& url, 576 const GURL& url,
576 const std::string& mime_type) { 577 const std::string& mime_type) {
577 // Check whether the mime type, if given, is known to be supported or whether 578 // Check whether the mime type, if given, is known to be supported or whether
578 // there is a plugin that supports the mime type (e.g. PDF). 579 // there is a plugin that supports the mime type (e.g. PDF).
579 // TODO(bauerb): This possibly uses stale information, but it's guaranteed not 580 // TODO(bauerb): This possibly uses stale information, but it's guaranteed not
580 // to do disk access. 581 // to do disk access.
581 content::WebPluginInfo plugin; 582 content::WebPluginInfo plugin;
582 tabstrip_->FileSupported( 583 tabstrip_->FileSupported(
583 url, 584 url,
584 mime_type.empty() || 585 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) ||
585 net::IsSupportedMimeType(mime_type) || 586 content::PluginService::GetInstance()->GetPluginInfo(
586 content::PluginService::GetInstance()->GetPluginInfo( 587 -1, // process ID
587 -1, // process ID 588 MSG_ROUTING_NONE, // routing ID
588 MSG_ROUTING_NONE, // routing ID 589 model_->profile()->GetResourceContext(), url, GURL(), mime_type,
589 model_->profile()->GetResourceContext(), 590 false, NULL, &plugin, NULL));
590 url, GURL(), mime_type, false,
591 NULL, &plugin, NULL));
592 } 591 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698