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

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

Issue 2378573005: [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash. (Closed)
Patch Set: fix dat merge Created 4 years, 2 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/common/render_messages.h » ('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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698