Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 7957002: Reland add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
3086 BookmarkModel* model = profile()->GetBookmarkModel(); 3086 BookmarkModel* model = profile()->GetBookmarkModel();
3087 return (model && model->IsLoaded()) && 3087 return (model && model->IsLoaded()) &&
3088 tab_count() > 1 && 3088 tab_count() > 1 &&
3089 profile()->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled); 3089 profile()->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled);
3090 } 3090 }
3091 3091
3092 void Browser::BookmarkAllTabs() { 3092 void Browser::BookmarkAllTabs() {
3093 BookmarkModel* model = profile()->GetBookmarkModel(); 3093 BookmarkModel* model = profile()->GetBookmarkModel();
3094 DCHECK(model && model->IsLoaded()); 3094 DCHECK(model && model->IsLoaded());
3095 3095
3096 BookmarkEditor::EditDetails details; 3096 BookmarkEditor::EditDetails details =
3097 details.type = BookmarkEditor::EditDetails::NEW_FOLDER; 3097 BookmarkEditor::EditDetails::AddFolder(model->GetParentForNewNodes());
3098 bookmark_utils::GetURLsForOpenTabs(this, &(details.urls)); 3098 bookmark_utils::GetURLsForOpenTabs(this, &(details.urls));
3099 DCHECK(!details.urls.empty()); 3099 DCHECK(!details.urls.empty());
3100 3100
3101 BookmarkEditor::Show(window()->GetNativeHandle(), profile_, 3101 BookmarkEditor::Show(window()->GetNativeHandle(), profile_, details,
3102 model->GetParentForNewNodes(), details,
3103 BookmarkEditor::SHOW_TREE); 3102 BookmarkEditor::SHOW_TREE);
3104 } 3103 }
3105 3104
3106 bool Browser::CanCloseTab() const { 3105 bool Browser::CanCloseTab() const {
3107 TabCloseableStateWatcher* watcher = 3106 TabCloseableStateWatcher* watcher =
3108 g_browser_process->tab_closeable_state_watcher(); 3107 g_browser_process->tab_closeable_state_watcher();
3109 return !watcher || watcher->CanCloseTab(this); 3108 return !watcher || watcher->CanCloseTab(this);
3110 } 3109 }
3111 3110
3112 void Browser::ToggleUseVerticalTabs() { 3111 void Browser::ToggleUseVerticalTabs() {
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
5275 } 5274 }
5276 } 5275 }
5277 5276
5278 // Suppress ntp4 bubble if another bubble will be shown on the same page. 5277 // Suppress ntp4 bubble if another bubble will be shown on the same page.
5279 if (did_show_bubble) { 5278 if (did_show_bubble) {
5280 PrefService* prefs = profile_->GetPrefs(); 5279 PrefService* prefs = profile_->GetPrefs();
5281 if (prefs->GetBoolean(prefs::kHomePageIsNewTabPage)) 5280 if (prefs->GetBoolean(prefs::kHomePageIsNewTabPage))
5282 prefs->SetBoolean(prefs::kNTP4SuppressIntroOnce, true); 5281 prefs->SetBoolean(prefs::kNTP4SuppressIntroOnce, true);
5283 } 5282 }
5284 } 5283 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698