Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make chrome/browser/chrome_browser_main_linux.* Linux-only.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/9839028

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@128650 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
  • Loading branch information...
commit 9ad4277465728caf96066e666885367e6c570be3 1 parent 68352a8
thestig@chromium.org authored
View
4 chrome_browser_main_extra_parts_gtk.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -21,6 +21,8 @@ class ChromeBrowserMainExtraPartsGtk : public ChromeBrowserMainExtraParts {
private:
void DetectRunningAsRoot();
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsGtk);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_GTK_H_
View
5 chrome_browser_main_extra_parts_views.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -16,6 +16,9 @@ class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts {
ChromeBrowserMainExtraPartsViews();
virtual void ToolkitInitialized() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsViews);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_H_
View
18 chrome_browser_main_linux.cc
@@ -1,26 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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/browser/chrome_browser_main_linux.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
-#endif
-
ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
const content::MainFunctionParams& parameters)
: ChromeBrowserMainPartsPosix(parameters) {
}
-
-void ChromeBrowserMainPartsLinux::ShowMissingLocaleMessageBox() {
-#if defined(USE_AURA)
- // This should never happen on Aura.
- NOTREACHED() << chrome_browser::kMissingLocaleDataMessage;
-#elif defined(TOOLKIT_USES_GTK)
- ChromeBrowserMainExtraPartsGtk::ShowMessageBox(
- chrome_browser::kMissingLocaleDataMessage);
-#else
-#error "Need MessageBox implementation for linux without Aura or Gtk"
-#endif
-}
View
6 chrome_browser_main_linux.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -16,8 +16,8 @@ class ChromeBrowserMainPartsLinux : public ChromeBrowserMainPartsPosix {
explicit ChromeBrowserMainPartsLinux(
const content::MainFunctionParams& parameters);
- // ChromeBrowserMainParts overrides.
- virtual void ShowMissingLocaleMessageBox() OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsLinux);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_LINUX_H_
View
8 chrome_browser_main_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -17,12 +17,12 @@ class ChromeBrowserMainPartsMac : public ChromeBrowserMainPartsPosix {
virtual void PreEarlyInitialization() OVERRIDE;
virtual void PreMainMessageLoopStart() OVERRIDE;
- // ChromeBrowserMainParts overrides.
- virtual void ShowMissingLocaleMessageBox() OVERRIDE;
-
// Perform platform-specific work that needs to be done after the main event
// loop has ended. The embedder must be sure to call this.
static void DidEndMainMessageLoop();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsMac);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_MAC_H_
View
5 chrome_browser_main_mac.mm
@@ -114,11 +114,6 @@ int DoUninstallTasks(bool chrome_still_running) {
setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
}
-void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() {
- // Not called on Mac because we load the locale files differently.
- NOTREACHED();
-}
-
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
AppController* appController = [NSApp delegate];
[appController didEndMainMessageLoop];
View
20 chrome_browser_main_posix.cc
@@ -27,6 +27,7 @@
#endif
#if defined(TOOLKIT_USES_GTK)
+#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
#include "chrome/browser/printing/print_dialog_gtk.h"
#endif
@@ -272,3 +273,22 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopStart() {
&PrintDialogGtk::CreatePrintDialog);
#endif
}
+
+void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() {
+#if defined(OS_CHROMEOS)
+ NOTREACHED(); // Should not ever happen on ChromeOS.
+#elif defined(OS_ANDROID)
+ // TODO(port) Update this as needed.
+ // Probably should not ever happen on Android, but at the time of this
+ // writing, Android isn't even using ChromeBrowserMainPartsPosix yet.
+ NOTREACHED();
+#elif defined(OS_MACOSX)
+ // Not called on Mac because we load the locale files differently.
+ NOTREACHED();
+#elif defined(TOOLKIT_USES_GTK)
+ ChromeBrowserMainExtraPartsGtk::ShowMessageBox(
+ chrome_browser::kMissingLocaleDataMessage);
+#else
+#error "Need MessageBox implementation."
+#endif
+}
View
15 chrome_browser_main_posix.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
-#define CHROME_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
+#ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
+#define CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
#include "chrome/browser/chrome_browser_main.h"
@@ -12,8 +12,15 @@ class ChromeBrowserMainPartsPosix : public ChromeBrowserMainParts {
explicit ChromeBrowserMainPartsPosix(
const content::MainFunctionParams& parameters);
+ // content::BrowserMainParts overrides.
virtual void PreEarlyInitialization() OVERRIDE;
virtual void PostMainMessageLoopStart() OVERRIDE;
+
+ // ChromeBrowserMainParts overrides.
+ virtual void ShowMissingLocaleMessageBox() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsPosix);
};
-#endif // CHROME_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
+#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
View
5 chrome_browser_main_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -52,6 +52,9 @@ class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts {
// allow the user level Chrome to run. So we notify the user and uninstall
// user level Chrome.
static bool CheckMachineLevelInstall();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_
View
4 chrome_content_browser_client.cc
@@ -102,7 +102,7 @@
#elif defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
#include "chrome/browser/chromeos/login/user_manager.h"
-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
+#elif defined(OS_LINUX)
#include "chrome/browser/chrome_browser_main_linux.h"
#elif defined(OS_POSIX)
#include "chrome/browser/chrome_browser_main_posix.h"
@@ -323,7 +323,7 @@ content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts(
main_parts = new ChromeBrowserMainPartsMac(parameters);
#elif defined(OS_CHROMEOS)
main_parts = new ChromeBrowserMainPartsChromeos(parameters);
-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
+#elif defined(OS_LINUX)
main_parts = new ChromeBrowserMainPartsLinux(parameters);
#elif defined(OS_ANDROID)
// Do nothing for Android.
Please sign in to comment.
Something went wrong with that request. Please try again.