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

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

Issue 473423005: Revert of Hook up the Mac password bubble to the browser and add browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 if (chrome_translate_client->GetLanguageState().translation_pending()) 790 if (chrome_translate_client->GetLanguageState().translation_pending())
791 step = translate::TRANSLATE_STEP_TRANSLATING; 791 step = translate::TRANSLATE_STEP_TRANSLATING;
792 else if (chrome_translate_client->GetLanguageState().IsPageTranslated()) 792 else if (chrome_translate_client->GetLanguageState().IsPageTranslated())
793 step = translate::TRANSLATE_STEP_AFTER_TRANSLATE; 793 step = translate::TRANSLATE_STEP_AFTER_TRANSLATE;
794 } 794 }
795 browser->window()->ShowTranslateBubble( 795 browser->window()->ShowTranslateBubble(
796 web_contents, step, translate::TranslateErrors::NONE, true); 796 web_contents, step, translate::TranslateErrors::NONE, true);
797 } 797 }
798 798
799 void ManagePasswordsForPage(Browser* browser) { 799 void ManagePasswordsForPage(Browser* browser) {
800 // TODO(mkwst): Implement this feature on Mac: http://crbug.com/261628
801 #if !defined(OS_MACOSX)
800 if (!browser->window()->IsActive()) 802 if (!browser->window()->IsActive())
801 return; 803 return;
802 804
803 WebContents* web_contents = 805 WebContents* web_contents =
804 browser->tab_strip_model()->GetActiveWebContents(); 806 browser->tab_strip_model()->GetActiveWebContents();
805 chrome::ShowManagePasswordsBubble(web_contents); 807 chrome::ShowManagePasswordsBubble(web_contents);
808 #endif
806 } 809 }
807 810
808 void TogglePagePinnedToStartScreen(Browser* browser) { 811 void TogglePagePinnedToStartScreen(Browser* browser) {
809 #if defined(OS_WIN) 812 #if defined(OS_WIN)
810 MetroPinTabHelper::FromWebContents( 813 MetroPinTabHelper::FromWebContents(
811 browser->tab_strip_model()->GetActiveWebContents())-> 814 browser->tab_strip_model()->GetActiveWebContents())->
812 TogglePinnedToStartScreen(); 815 TogglePinnedToStartScreen();
813 #endif 816 #endif
814 } 817 }
815 818
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 browser->profile(), 1281 browser->profile(),
1279 browser->host_desktop_type())); 1282 browser->host_desktop_type()));
1280 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1283 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1281 1284
1282 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1285 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1283 contents->GetRenderViewHost()->SyncRendererPrefs(); 1286 contents->GetRenderViewHost()->SyncRendererPrefs();
1284 app_browser->window()->Show(); 1287 app_browser->window()->Show();
1285 } 1288 }
1286 1289
1287 } // namespace chrome 1290 } // 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