import Chromium 11 with DragonFly patches from rxg
[chromium.git] / patches / patch-chrome_browser_ui_browser.cc
1 $NetBSD$
2
3 --- chrome/browser/ui/browser.cc.orig   2011-05-07 09:40:36.000000000 +0000
4 +++ chrome/browser/ui/browser.cc
5 @@ -277,7 +277,7 @@ Browser::~Browser() {
6  
7    BrowserList::RemoveBrowser(this);
8  
9 -#if defined(OS_WIN) || defined(OS_LINUX)
10 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
11    if (!BrowserList::HasBrowserWithProfile(profile_)) {
12      // We're the last browser window with this profile. We need to nuke the
13      // TabRestoreService, which will start the shutdown of the
14 @@ -817,7 +817,7 @@ string16 Browser::GetWindowTitleForCurre
15    // On Mac or ChromeOS, we don't want to suffix the page title with
16    // the application name.
17    return title;
18 -#elif defined(OS_WIN) || defined(OS_LINUX)
19 +#elif defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
20    int string_id = IDS_BROWSER_WINDOW_TITLE_FORMAT;
21    // Don't append the app name to window titles on app frames and app popups
22    if (type_ & TYPE_APP)
23 @@ -1499,7 +1499,7 @@ void Browser::ToggleFullscreenMode() {
24    window_->SetFullscreen(!window_->IsFullscreen());
25    // On Linux, setting fullscreen mode is an async call to the X server, which
26    // may or may not support fullscreen mode.
27 -#if !defined(OS_LINUX)
28 +#if !defined(OS_LINUX) && !defined(OS_BSD)
29    UpdateCommandsForFullscreenMode(window_->IsFullscreen());
30  #endif
31  }
32 @@ -1758,7 +1758,7 @@ void Browser::OpenFile() {
33  
34  void Browser::OpenCreateShortcutsDialog() {
35    UserMetrics::RecordAction(UserMetricsAction("CreateShortcut"), profile_);
36 -#if defined(OS_WIN) || defined(OS_LINUX)
37 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
38    TabContentsWrapper* current_tab = GetSelectedTabContentsWrapper();
39    DCHECK(current_tab &&
40        web_app::IsValidUrl(current_tab->tab_contents()->GetURL())) <<
41 @@ -2595,7 +2595,7 @@ void Browser::DuplicateContentsAt(int in
42  }
43  
44  void Browser::CloseFrameAfterDragSession() {
45 -#if defined(OS_WIN) || defined(OS_LINUX)
46 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
47    // This is scheduled to run after we return to the message loop because
48    // otherwise the frame will think the drag session is still active and ignore
49    // the request.