openbsd-ports/www/chromium/patches/patch-chrome_browser_ui_browser_cc
2011-03-15 11:38:05 +00:00

49 lines
2.2 KiB
Plaintext

$OpenBSD: patch-chrome_browser_ui_browser_cc,v 1.2 2011/03/15 11:38:05 robert Exp $
--- chrome/browser/ui/browser.cc.orig Fri Mar 11 10:01:42 2011
+++ chrome/browser/ui/browser.cc Mon Mar 14 10:55:37 2011
@@ -263,7 +263,7 @@ Browser::~Browser() {
BrowserList::RemoveBrowser(this);
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD)
if (!BrowserList::HasBrowserWithProfile(profile_)) {
// We're the last browser window with this profile. We need to nuke the
// TabRestoreService, which will start the shutdown of the
@@ -810,7 +810,7 @@ string16 Browser::GetWindowTitleForCurrentTab() const
// On Mac or ChromeOS, we don't want to suffix the page title with
// the application name.
return title;
-#elif defined(OS_WIN) || defined(OS_LINUX)
+#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD)
int string_id = IDS_BROWSER_WINDOW_TITLE_FORMAT;
// Don't append the app name to window titles on app frames and app popups
if (type_ & TYPE_APP)
@@ -1459,7 +1459,7 @@ void Browser::ToggleFullscreenMode() {
window_->SetFullscreen(!window_->IsFullscreen());
// On Linux, setting fullscreen mode is an async call to the X server, which
// may or may not support fullscreen mode.
-#if !defined(OS_LINUX)
+#if !defined(OS_LINUX) && !defined(OS_OPENBSD)
UpdateCommandsForFullscreenMode(window_->IsFullscreen());
#endif
}
@@ -1706,7 +1706,7 @@ void Browser::OpenFile() {
void Browser::OpenCreateShortcutsDialog() {
UserMetrics::RecordAction(UserMetricsAction("CreateShortcut"), profile_);
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD)
TabContentsWrapper* current_tab = GetSelectedTabContentsWrapper();
DCHECK(current_tab &&
web_app::IsValidUrl(current_tab->tab_contents()->GetURL())) <<
@@ -2516,7 +2516,7 @@ void Browser::DuplicateContentsAt(int index) {
}
void Browser::CloseFrameAfterDragSession() {
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD)
// This is scheduled to run after we return to the message loop because
// otherwise the frame will think the drag session is still active and ignore
// the request.