diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 20:35:48 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 20:35:48 +0000 |
commit | afc848fc2285b6b7e5133d836086812981277475 (patch) | |
tree | aa36ce30b66b6a54865f1e16499689fe45b8f124 /chrome/common | |
parent | c640dd492bbd263e7440c802d63f78a025273110 (diff) | |
download | chromium_src-afc848fc2285b6b7e5133d836086812981277475.zip chromium_src-afc848fc2285b6b7e5133d836086812981277475.tar.gz chromium_src-afc848fc2285b6b7e5133d836086812981277475.tar.bz2 |
Move some message files and hi_res_timer_manager to content, in preparation for moving worker code.
TBR=avi
Review URL: http://codereview.chromium.org/6685027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/common_message_generator.h | 2 | ||||
-rw-r--r-- | chrome/common/file_utilities_messages.h | 33 | ||||
-rw-r--r-- | chrome/common/hi_res_timer_manager.h | 30 | ||||
-rw-r--r-- | chrome/common/hi_res_timer_manager_posix.cc | 20 | ||||
-rw-r--r-- | chrome/common/hi_res_timer_manager_win.cc | 29 | ||||
-rw-r--r-- | chrome/common/mime_registry_messages.h | 26 |
6 files changed, 0 insertions, 140 deletions
diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h index bc07d72..bd1fffb 100644 --- a/chrome/common/common_message_generator.h +++ b/chrome/common/common_message_generator.h @@ -7,9 +7,7 @@ #include "chrome/common/autofill_messages.h" #include "chrome/common/clipboard_messages.h" #include "chrome/common/database_messages.h" -#include "chrome/common/file_utilities_messages.h" #include "chrome/common/indexed_db_messages.h" -#include "chrome/common/mime_registry_messages.h" #include "chrome/common/safebrowsing_messages.h" #include "chrome/common/speech_input_messages.h" #include "chrome/common/utility_messages.h" diff --git a/chrome/common/file_utilities_messages.h b/chrome/common/file_utilities_messages.h deleted file mode 100644 index eb35263..0000000 --- a/chrome/common/file_utilities_messages.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Multiply-included message file, so no include guard. - -#include "base/time.h" -#include "chrome/common/common_param_traits.h" -#include "ipc/ipc_message_macros.h" -#include "ipc/ipc_param_traits.h" -#include "ipc/ipc_platform_file.h" - -#define IPC_MESSAGE_START FileUtilitiesMsgStart - -// File utilities messages sent from the renderer to the browser. - -// Get file size in bytes. Set result to -1 if failed to get the file size. -IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileSize, - FilePath /* path */, - int64 /* result */) - -// Get file modification time in seconds. Set result to 0 if failed to get the -// file modification time. -IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileModificationTime, - FilePath /* path */, - base::Time /* result */) - -// Open the file. -IPC_SYNC_MESSAGE_CONTROL2_1(FileUtilitiesMsg_OpenFile, - FilePath /* path */, - int /* mode */, - IPC::PlatformFileForTransit /* result */) - diff --git a/chrome/common/hi_res_timer_manager.h b/chrome/common/hi_res_timer_manager.h deleted file mode 100644 index 25c02cd..0000000 --- a/chrome/common/hi_res_timer_manager.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_COMMON_HI_RES_TIMER_MANAGER_H_ -#define CHROME_COMMON_HI_RES_TIMER_MANAGER_H_ -#pragma once - -#include "ui/base/system_monitor/system_monitor.h" - -// Ensures that the Windows high resolution timer is only used -// when not running on battery power. -class HighResolutionTimerManager : public ui::SystemMonitor::PowerObserver { - public: - HighResolutionTimerManager(); - virtual ~HighResolutionTimerManager(); - - // ui::SystemMonitor::PowerObserver: - virtual void OnPowerStateChange(bool on_battery_power); - - private: - // Enable or disable the faster multimedia timer. - void UseHiResClock(bool use); - - bool hi_res_clock_used_; - - DISALLOW_COPY_AND_ASSIGN(HighResolutionTimerManager); -}; - -#endif // CHROME_COMMON_HI_RES_TIMER_MANAGER_H_ diff --git a/chrome/common/hi_res_timer_manager_posix.cc b/chrome/common/hi_res_timer_manager_posix.cc deleted file mode 100644 index fc9c1ba..0000000 --- a/chrome/common/hi_res_timer_manager_posix.cc +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/hi_res_timer_manager.h" - -// On POSIX we don't need to do anything special with the system timer. - -HighResolutionTimerManager::HighResolutionTimerManager() - : hi_res_clock_used_(false) { -} - -HighResolutionTimerManager::~HighResolutionTimerManager() { -} - -void HighResolutionTimerManager::OnPowerStateChange(bool on_battery_power) { -} - -void HighResolutionTimerManager::UseHiResClock(bool use) { -} diff --git a/chrome/common/hi_res_timer_manager_win.cc b/chrome/common/hi_res_timer_manager_win.cc deleted file mode 100644 index c165222..0000000 --- a/chrome/common/hi_res_timer_manager_win.cc +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/hi_res_timer_manager.h" - -#include "base/time.h" - -HighResolutionTimerManager::HighResolutionTimerManager() - : hi_res_clock_used_(false) { - ui::SystemMonitor* system_monitor = ui::SystemMonitor::Get(); - system_monitor->AddObserver(this); - UseHiResClock(!system_monitor->BatteryPower()); -} - -HighResolutionTimerManager::~HighResolutionTimerManager() { - ui::SystemMonitor::Get()->RemoveObserver(this); - UseHiResClock(false); -} - -void HighResolutionTimerManager::OnPowerStateChange(bool on_battery_power) { - UseHiResClock(!on_battery_power); -} - -void HighResolutionTimerManager::UseHiResClock(bool use) { - if (use == hi_res_clock_used_) - return; - base::Time::EnableHighResolutionTimer(use); -} diff --git a/chrome/common/mime_registry_messages.h b/chrome/common/mime_registry_messages.h deleted file mode 100644 index ba6ebe4..0000000 --- a/chrome/common/mime_registry_messages.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Multiply-included message file, so no include guard. - -#include "base/file_path.h" -#include "chrome/common/common_param_traits.h" -#include "ipc/ipc_message_macros.h" -#include "ipc/ipc_param_traits.h" - -#define IPC_MESSAGE_START MimeRegistryMsgStart - -// Mime registry messages sent from the renderer to the browser. - -// Sent to query MIME information. -IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetMimeTypeFromExtension, - FilePath::StringType /* extension */, - std::string /* mime_type */) -IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetMimeTypeFromFile, - FilePath /* file_path */, - std::string /* mime_type */) -IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetPreferredExtensionForMimeType, - std::string /* mime_type */, - FilePath::StringType /* extension */) - |