| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3167 return (model && model->IsLoaded()) && | 3167 return (model && model->IsLoaded()) && |
| 3168 tab_count() > 1 && | 3168 tab_count() > 1 && |
| 3169 profile()->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled); | 3169 profile()->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled); |
| 3170 } | 3170 } |
| 3171 | 3171 |
| 3172 void Browser::BookmarkAllTabs() { | 3172 void Browser::BookmarkAllTabs() { |
| 3173 BookmarkModel* model = profile()->GetBookmarkModel(); | 3173 BookmarkModel* model = profile()->GetBookmarkModel(); |
| 3174 DCHECK(model && model->IsLoaded()); | 3174 DCHECK(model && model->IsLoaded()); |
| 3175 | 3175 |
| 3176 BookmarkEditor::EditDetails details = | 3176 BookmarkEditor::EditDetails details = |
| 3177 BookmarkEditor::EditDetails::AddFolder(model->GetParentForNewNodes()); | 3177 BookmarkEditor::EditDetails::AddFolder(model->GetParentForNewNodes(), -1); |
| 3178 bookmark_utils::GetURLsForOpenTabs(this, &(details.urls)); | 3178 bookmark_utils::GetURLsForOpenTabs(this, &(details.urls)); |
| 3179 DCHECK(!details.urls.empty()); | 3179 DCHECK(!details.urls.empty()); |
| 3180 | 3180 |
| 3181 BookmarkEditor::Show(window()->GetNativeHandle(), profile_, details, | 3181 BookmarkEditor::Show(window()->GetNativeHandle(), profile_, details, |
| 3182 BookmarkEditor::SHOW_TREE); | 3182 BookmarkEditor::SHOW_TREE); |
| 3183 } | 3183 } |
| 3184 | 3184 |
| 3185 bool Browser::CanCloseTab() const { | 3185 bool Browser::CanCloseTab() const { |
| 3186 TabCloseableStateWatcher* watcher = | 3186 TabCloseableStateWatcher* watcher = |
| 3187 g_browser_process->tab_closeable_state_watcher(); | 3187 g_browser_process->tab_closeable_state_watcher(); |
| (...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5494 } | 5494 } |
| 5495 | 5495 |
| 5496 void Browser::UpdateFullscreenExitBubbleContent() { | 5496 void Browser::UpdateFullscreenExitBubbleContent() { |
| 5497 GURL url; | 5497 GURL url; |
| 5498 if (fullscreened_tab_) | 5498 if (fullscreened_tab_) |
| 5499 url = fullscreened_tab_->tab_contents()->GetURL(); | 5499 url = fullscreened_tab_->tab_contents()->GetURL(); |
| 5500 | 5500 |
| 5501 window_->UpdateFullscreenExitBubbleContent( | 5501 window_->UpdateFullscreenExitBubbleContent( |
| 5502 url, GetFullscreenExitBubbleType()); | 5502 url, GetFullscreenExitBubbleType()); |
| 5503 } | 5503 } |
| OLD | NEW |