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

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

Issue 505123002: Revert "Revert of Hook up the Mac password bubble to the browser and add browser tests. (patchset #… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include for real this time Created 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 if (chrome_translate_client->GetLanguageState().translation_pending()) 789 if (chrome_translate_client->GetLanguageState().translation_pending())
790 step = translate::TRANSLATE_STEP_TRANSLATING; 790 step = translate::TRANSLATE_STEP_TRANSLATING;
791 else if (chrome_translate_client->GetLanguageState().IsPageTranslated()) 791 else if (chrome_translate_client->GetLanguageState().IsPageTranslated())
792 step = translate::TRANSLATE_STEP_AFTER_TRANSLATE; 792 step = translate::TRANSLATE_STEP_AFTER_TRANSLATE;
793 } 793 }
794 browser->window()->ShowTranslateBubble( 794 browser->window()->ShowTranslateBubble(
795 web_contents, step, translate::TranslateErrors::NONE, true); 795 web_contents, step, translate::TranslateErrors::NONE, true);
796 } 796 }
797 797
798 void ManagePasswordsForPage(Browser* browser) { 798 void ManagePasswordsForPage(Browser* browser) {
799 // TODO(mkwst): Implement this feature on Mac: http://crbug.com/261628
800 #if !defined(OS_MACOSX)
801 if (!browser->window()->IsActive()) 799 if (!browser->window()->IsActive())
802 return; 800 return;
803 801
804 WebContents* web_contents = 802 WebContents* web_contents =
805 browser->tab_strip_model()->GetActiveWebContents(); 803 browser->tab_strip_model()->GetActiveWebContents();
806 chrome::ShowManagePasswordsBubble(web_contents); 804 chrome::ShowManagePasswordsBubble(web_contents);
807 #endif
808 } 805 }
809 806
810 void TogglePagePinnedToStartScreen(Browser* browser) { 807 void TogglePagePinnedToStartScreen(Browser* browser) {
811 #if defined(OS_WIN) 808 #if defined(OS_WIN)
812 MetroPinTabHelper::FromWebContents( 809 MetroPinTabHelper::FromWebContents(
813 browser->tab_strip_model()->GetActiveWebContents())-> 810 browser->tab_strip_model()->GetActiveWebContents())->
814 TogglePinnedToStartScreen(); 811 TogglePinnedToStartScreen();
815 #endif 812 #endif
816 } 813 }
817 814
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 browser->profile(), 1277 browser->profile(),
1281 browser->host_desktop_type())); 1278 browser->host_desktop_type()));
1282 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1279 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1283 1280
1284 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1281 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1285 contents->GetRenderViewHost()->SyncRendererPrefs(); 1282 contents->GetRenderViewHost()->SyncRendererPrefs();
1286 app_browser->window()->Show(); 1283 app_browser->window()->Show();
1287 } 1284 }
1288 1285
1289 } // namespace chrome 1286 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/chrome_password_manager_client.cc ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698