summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 19:34:42 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 19:34:42 +0000
commit0ff0ff32b0b9f301200cb4e595fef541118a2987 (patch)
treea5b2b36d46f61da2ec5f7f1342d493bacdd06a39 /chrome
parent77b068f9a6b46531e3155f77e4832ce26cfe966f (diff)
downloadchromium_src-0ff0ff32b0b9f301200cb4e595fef541118a2987.zip
chromium_src-0ff0ff32b0b9f301200cb4e595fef541118a2987.tar.gz
chromium_src-0ff0ff32b0b9f301200cb4e595fef541118a2987.tar.bz2
Cleanup: USE_X11 + OS_MACOSX = OS_POSIX.
BUG=none TEST=none Review URL: http://codereview.chromium.org/5856001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_focus_uitest.cc4
-rw-r--r--chrome/browser/printing/print_job_worker.cc12
-rw-r--r--chrome/browser/printing/print_job_worker.h4
-rw-r--r--chrome/browser/process_singleton.h16
-rw-r--r--chrome/renderer/render_view.cc7
5 files changed, 22 insertions, 21 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 836b335..0be8a42 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -178,14 +178,14 @@ class TestInterstitialPage : public InterstitialPage {
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) {
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
-#if defined(USE_X11) || defined(OS_MACOSX)
+#if defined(OS_POSIX)
// It seems we have to wait a little bit for the widgets to spin up before
// we can start clicking on them.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
new MessageLoop::QuitTask(),
kActionDelayMs);
ui_test_utils::RunMessageLoop();
-#endif
+#endif // defined(OS_POSIX)
ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR));
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 24062d1..26b5fb3 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -84,7 +84,7 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings,
printing_context_->set_use_overlays(use_overlays);
if (ask_user_for_settings) {
-#if defined(OS_MACOSX) || defined(USE_X11)
+#if defined(OS_POSIX)
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &PrintJobWorker::GetSettingsWithUI,
@@ -96,14 +96,14 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings,
document_page_count,
has_selection,
NewCallback(this, &PrintJobWorker::GetSettingsDone));
-#endif // defined(OS_MACOSX) || defined(USE_X11)
+#endif // defined(OS_POSIX)
} else {
-#if defined(OS_MACOSX) || defined(USE_X11)
+#if defined(OS_POSIX)
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &PrintJobWorker::UseDefaultSettings));
#else
UseDefaultSettings();
-#endif // defined(OS_MACOSX) || defined(USE_X11)
+#endif // defined(OS_POSIX)
}
}
@@ -122,7 +122,7 @@ void PrintJobWorker::GetSettingsDone(PrintingContext::Result result) {
result));
}
-#if defined(OS_MACOSX) || defined(USE_X11)
+#if defined(OS_POSIX)
void PrintJobWorker::GetSettingsWithUI(gfx::NativeView parent_view,
int document_page_count,
bool has_selection) {
@@ -139,7 +139,7 @@ void PrintJobWorker::GetSettingsWithUIDone(PrintingContext::Result result) {
message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
this, &PrintJobWorker::GetSettingsDone, result));
}
-#endif // defined(OS_MACOSX) || defined(USE_X11)
+#endif // defined(OS_POSIX)
void PrintJobWorker::UseDefaultSettings() {
PrintingContext::Result result = printing_context_->UseDefaultSettings();
diff --git a/chrome/browser/printing/print_job_worker.h b/chrome/browser/printing/print_job_worker.h
index a932543..e568286 100644
--- a/chrome/browser/printing/print_job_worker.h
+++ b/chrome/browser/printing/print_job_worker.h
@@ -83,7 +83,7 @@ class PrintJobWorker : public base::Thread {
// context.
void OnFailure();
-#if defined(OS_MACOSX) || defined(USE_X11)
+#if defined(OS_POSIX)
// Asks the user for print settings. Must be called on the UI thread.
// Mac and Linux-only since Windows can display UI from non-main threads.
void GetSettingsWithUI(gfx::NativeView parent_view,
@@ -94,7 +94,7 @@ class PrintJobWorker : public base::Thread {
// object that the print settings are set. This is needed in order to bounce
// back into the IO thread for GetSettingsDone().
void GetSettingsWithUIDone(PrintingContext::Result result);
-#endif
+#endif // defined(OS_POSIX)
// Reports settings back to owner_.
void GetSettingsDone(PrintingContext::Result result);
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index c8f34ed..250d96bd 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -10,19 +10,21 @@
#if defined(OS_WIN)
#include <windows.h>
-#endif
+#endif // defined(OS_WIN)
#include "base/basictypes.h"
-#if defined(USE_X11) || defined(OS_MACOSX)
-#include "base/file_path.h"
-#endif
#include "base/logging.h"
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
#include "gfx/native_widget_types.h"
+
+#if defined(OS_POSIX)
+#include "base/file_path.h"
+#endif // defined(OS_POSIX)
+
#if defined(USE_X11)
#include "base/scoped_temp_dir.h"
-#endif
+#endif // defined(USE_X11)
class CommandLine;
class FilePath;
@@ -65,7 +67,7 @@ class ProcessSingleton : public NonThreadSafe {
// instance.
NotifyResult NotifyOtherProcessOrCreate();
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(OS_LINUX)
// Exposed for testing. We use a timeout on Linux, and in tests we want
// this timeout to be short.
NotifyResult NotifyOtherProcessWithTimeout(const CommandLine& command_line,
@@ -74,7 +76,7 @@ class ProcessSingleton : public NonThreadSafe {
NotifyResult NotifyOtherProcessWithTimeoutOrCreate(
const CommandLine& command_line,
int timeout_seconds);
-#endif
+#endif // defined(OS_LINUX)
// Sets ourself up as the singleton instance. Returns true on success. If
// false is returned, we are not the singleton instance and the caller must
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5dd3359..60fddbf 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2244,7 +2244,7 @@ bool RenderView::isSelectTrailingWhitespaceEnabled() {
}
void RenderView::didChangeSelection(bool is_empty_selection) {
-#if defined(USE_X11) || defined(OS_MACOSX)
+#if defined(OS_POSIX)
if (!handling_input_event_)
return;
// TODO(estade): investigate incremental updates to the selection so that we
@@ -2266,7 +2266,7 @@ void RenderView::didChangeSelection(bool is_empty_selection) {
Send(new ViewHostMsg_SelectionChanged(routing_id_,
last_selection_));
}
-#endif
+#endif // defined(OS_POSIX)
}
void RenderView::didExecuteCommand(const WebString& command_name) {
@@ -5633,8 +5633,7 @@ void RenderView::OnPageTranslated() {
}
#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-WebKit::WebGeolocationClient* RenderView::geolocationClient()
-{
+WebKit::WebGeolocationClient* RenderView::geolocationClient() {
if (!geolocation_dispatcher_.get())
geolocation_dispatcher_.reset(new GeolocationDispatcher(this));
return geolocation_dispatcher_.get();