summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 18:47:20 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 18:47:20 +0000
commit4159e7f4840e961b69e4f9438a5858d0b3fe6e63 (patch)
tree014e23d7e937a99e6e9d98ca005622f8dfbe9935 /content
parent2cc986c47746f59aad961b0791fd1620ff599d70 (diff)
downloadchromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.zip
chromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.tar.gz
chromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.tar.bz2
mac: Prepare for -Wunused-functions.
Mostly involves deleting hundreds of lines of unused code. BUG=315884 R=akalin@chromium.org, brettw@chromium.org, fischman@chromium.org, jamesr@chromium.org, sky@chromium.org, thestig@chromium.org TBR=piman, youngki Review URL: https://codereview.chromium.org/63153003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/download/download_manager_impl.cc7
-rw-r--r--content/browser/renderer_host/render_widget_host_view_guest.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm9
-rw-r--r--content/child/indexed_db/indexed_db_dispatcher.cc3
-rw-r--r--content/child/npapi/plugin_instance_mac.mm50
-rw-r--r--content/child/site_isolation_policy.cc15
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc6
-rw-r--r--content/renderer/npapi/webplugin_delegate_proxy.cc8
8 files changed, 2 insertions, 98 deletions
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index bd66f06..db41e5b 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -157,13 +157,6 @@ class MapValueIteratorAdapter {
// Allow copy and assign.
};
-void EnsureNoPendingDownloadJobsOnFile(bool* result) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- *result = (DownloadFile::GetNumberOfDownloadFiles() == 0);
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE, base::MessageLoop::QuitClosure());
-}
-
class DownloadItemFactoryImpl : public DownloadItemFactory {
public:
DownloadItemFactoryImpl() {}
diff --git a/content/browser/renderer_host/render_widget_host_view_guest.cc b/content/browser/renderer_host/render_widget_host_view_guest.cc
index 49c55fe..dc17491 100644
--- a/content/browser/renderer_host/render_widget_host_view_guest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_guest.cc
@@ -29,6 +29,7 @@ namespace content {
namespace {
+#if defined(OS_WIN) || defined(USE_AURA)
bool ShouldSendPinchGesture() {
static bool pinch_allowed =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePinch);
@@ -42,6 +43,7 @@ blink::WebGestureEvent CreateFlingCancelEvent(double time_stamp) {
gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen;
return gesture_event;
}
+#endif // defined(OS_WIN) || defined(USE_AURA)
} // namespace
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9082dd1..3b6849f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -131,15 +131,6 @@ static NSString* const NSBackingPropertyOldScaleFactorKey =
#endif // 10.7
-static inline int ToWebKitModifiers(NSUInteger flags) {
- int modifiers = 0;
- if (flags & NSControlKeyMask) modifiers |= WebInputEvent::ControlKey;
- if (flags & NSShiftKeyMask) modifiers |= WebInputEvent::ShiftKey;
- if (flags & NSAlternateKeyMask) modifiers |= WebInputEvent::AltKey;
- if (flags & NSCommandKeyMask) modifiers |= WebInputEvent::MetaKey;
- return modifiers;
-}
-
// This method will return YES for OS X versions 10.7.3 and later, and NO
// otherwise.
// Used to prevent a crash when building with the 10.7 SDK and accessing the
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
index b453f50..fe9554a 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher.cc
@@ -39,9 +39,6 @@ namespace {
IndexedDBDispatcher* const kHasBeenDeleted =
reinterpret_cast<IndexedDBDispatcher*>(0x1);
-int32 CurrentWorkerId() {
- return WorkerTaskRunner::Instance()->CurrentWorkerId();
-}
} // unnamed namespace
const size_t kMaxIDBValueSizeInBytes = 64 * 1024 * 1024;
diff --git a/content/child/npapi/plugin_instance_mac.mm b/content/child/npapi/plugin_instance_mac.mm
index 5453f8f..bc8edb2 100644
--- a/content/child/npapi/plugin_instance_mac.mm
+++ b/content/child/npapi/plugin_instance_mac.mm
@@ -19,56 +19,6 @@
namespace content {
-namespace {
-
-// Returns an autoreleased NSEvent constructed from the given np_event,
-// targeting the given window.
-NSEvent* NSEventForNPCocoaEvent(NPCocoaEvent* np_event, NSWindow* window) {
- bool mouse_down = 1;
- switch (np_event->type) {
- case NPCocoaEventMouseDown:
- mouse_down = 1;
- break;
- case NPCocoaEventMouseUp:
- mouse_down = 0;
- break;
- default:
- // If plugins start bringing up context menus for things other than
- // clicks, this will need more plumbing; for now just log it and proceed
- // as if it were a mouse down.
- NOTREACHED();
- }
- NSEventType event_type = NSLeftMouseDown;
- switch (np_event->data.mouse.buttonNumber) {
- case 0:
- event_type = mouse_down ? NSLeftMouseDown : NSLeftMouseUp;
- break;
- case 1:
- event_type = mouse_down ? NSRightMouseDown : NSRightMouseUp;
- break;
- default:
- event_type = mouse_down ? NSOtherMouseDown : NSOtherMouseUp;
- break;
- }
-
- NSInteger click_count = np_event->data.mouse.clickCount;
- NSInteger modifiers = np_event->data.mouse.modifierFlags;
- // NPCocoaEvent doesn't have a timestamp, so just use the current time.
- NSEvent* event =
- [NSEvent mouseEventWithType:event_type
- location:NSZeroPoint
- modifierFlags:modifiers
- timestamp:[[NSApp currentEvent] timestamp]
- windowNumber:[window windowNumber]
- context:[NSGraphicsContext currentContext]
- eventNumber:0
- clickCount:click_count
- pressure:1.0];
- return event;
-}
-
-} // namespace
-
NPError PluginInstance::PopUpContextMenu(NPMenu* menu) {
if (!currently_handled_event_)
return NPERR_GENERIC_ERROR;
diff --git a/content/child/site_isolation_policy.cc b/content/child/site_isolation_policy.cc
index a761a06..e98d744 100644
--- a/content/child/site_isolation_policy.cc
+++ b/content/child/site_isolation_policy.cc
@@ -158,21 +158,6 @@ void HistogramCountNotBlockedResponse(const std::string& bucket_prefix,
IncrementHistogramCount(bucket_prefix + ".NotBlocked.MaybeJS");
}
-void HistogramCountPolicyDecision(
- const std::string& bucket_prefix,
- bool sniffed_as_document,
- bool sniffed_as_js,
- const SiteIsolationPolicy::ResponseMetaData& resp_data) {
- if (sniffed_as_document) {
- HistogramCountBlockedResponse(bucket_prefix, resp_data, false);
- } else {
- if (resp_data.no_sniff)
- HistogramCountBlockedResponse(bucket_prefix, resp_data, true);
- else
- HistogramCountNotBlockedResponse(bucket_prefix, sniffed_as_js);
- }
-}
-
} // namespace
SiteIsolationPolicy::ResponseMetaData::ResponseMetaData() {}
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 4202c7e..6cfe532 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -50,12 +50,6 @@ typedef std::multimap<GpuChannelHost*, WebGraphicsContext3DCommandBufferImpl*>
static base::LazyInstance<ContextMap> g_all_shared_contexts =
LAZY_INSTANCE_INITIALIZER;
-size_t ClampUint64ToSizeT(uint64 value) {
- value = std::min(value,
- static_cast<uint64>(std::numeric_limits<size_t>::max()));
- return static_cast<size_t>(value);
-}
-
uint32_t GenFlushID() {
static base::subtle::Atomic32 flush_id = 0;
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index 7d5bf54..0899c21 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -666,14 +666,6 @@ bool WebPluginDelegateProxy::CreateSharedBitmap(
return !!canvas->get();
}
-#if defined(OS_MACOSX)
-// Flips |rect| vertically within an enclosing rect with height |height|.
-// Intended for converting rects between flipped and non-flipped contexts.
-static void FlipRectVerticallyWithHeight(gfx::Rect* rect, int height) {
- rect->set_y(height - rect->bottom());
-}
-#endif
-
void WebPluginDelegateProxy::Paint(SkCanvas* canvas,
const gfx::Rect& damaged_rect) {
// Limit the damaged rectangle to whatever is contained inside the plugin