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

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

Issue 928753003: Clean password_manager::ui::State (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 } 811 }
812 812
813 void ManagePasswordsForPage(Browser* browser) { 813 void ManagePasswordsForPage(Browser* browser) {
814 if (!browser->window()->IsActive()) 814 if (!browser->window()->IsActive())
815 return; 815 return;
816 816
817 WebContents* web_contents = 817 WebContents* web_contents =
818 browser->tab_strip_model()->GetActiveWebContents(); 818 browser->tab_strip_model()->GetActiveWebContents();
819 ManagePasswordsUIController* controller = 819 ManagePasswordsUIController* controller =
820 ManagePasswordsUIController::FromWebContents(web_contents); 820 ManagePasswordsUIController::FromWebContents(web_contents);
821 TabDialogs::FromWebContents(web_contents) 821 TabDialogs::FromWebContents(web_contents)->ShowManagePasswordsBubble(
822 ->ShowManagePasswordsBubble( 822 !controller->IsAutomaticallyOpeningBubble());
823 !password_manager::ui::IsAutomaticDisplayState(controller->state()));
824 } 823 }
825 824
826 #if defined(OS_WIN) 825 #if defined(OS_WIN)
827 void TogglePagePinnedToStartScreen(Browser* browser) { 826 void TogglePagePinnedToStartScreen(Browser* browser) {
828 MetroPinTabHelper::FromWebContents( 827 MetroPinTabHelper::FromWebContents(
829 browser->tab_strip_model()->GetActiveWebContents())-> 828 browser->tab_strip_model()->GetActiveWebContents())->
830 TogglePinnedToStartScreen(); 829 TogglePinnedToStartScreen();
831 } 830 }
832 #endif 831 #endif
833 832
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 browser->host_desktop_type())); 1277 browser->host_desktop_type()));
1279 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1278 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1280 1279
1281 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1280 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1282 contents->GetRenderViewHost()->SyncRendererPrefs(); 1281 contents->GetRenderViewHost()->SyncRendererPrefs();
1283 app_browser->window()->Show(); 1282 app_browser->window()->Show();
1284 } 1283 }
1285 #endif // defined(ENABLE_EXTENSIONS) 1284 #endif // defined(ENABLE_EXTENSIONS)
1286 1285
1287 } // namespace chrome 1286 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698