OLD | NEW |
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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 CanBookmarkCurrentPageInternal(browser, false); | 809 CanBookmarkCurrentPageInternal(browser, false); |
810 } | 810 } |
811 | 811 |
812 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 812 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
813 void SaveCreditCard(Browser* browser) { | 813 void SaveCreditCard(Browser* browser) { |
814 WebContents* web_contents = | 814 WebContents* web_contents = |
815 browser->tab_strip_model()->GetActiveWebContents(); | 815 browser->tab_strip_model()->GetActiveWebContents(); |
816 autofill::SaveCardBubbleControllerImpl* controller = | 816 autofill::SaveCardBubbleControllerImpl* controller = |
817 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents); | 817 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents); |
818 DCHECK(controller); | 818 DCHECK(controller); |
819 controller->ShowBubble(); | 819 controller->ShowBubble(true); |
820 } | 820 } |
821 #endif | 821 #endif |
822 | 822 |
823 void Translate(Browser* browser) { | 823 void Translate(Browser* browser) { |
824 if (!browser->window()->IsActive()) | 824 if (!browser->window()->IsActive()) |
825 return; | 825 return; |
826 | 826 |
827 WebContents* web_contents = | 827 WebContents* web_contents = |
828 browser->tab_strip_model()->GetActiveWebContents(); | 828 browser->tab_strip_model()->GetActiveWebContents(); |
829 ChromeTranslateClient* chrome_translate_client = | 829 ChromeTranslateClient* chrome_translate_client = |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 browser->host_desktop_type())); | 1320 browser->host_desktop_type())); |
1321 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1321 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1322 | 1322 |
1323 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1323 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1324 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1324 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1325 app_browser->window()->Show(); | 1325 app_browser->window()->Show(); |
1326 } | 1326 } |
1327 #endif // defined(ENABLE_EXTENSIONS) | 1327 #endif // defined(ENABLE_EXTENSIONS) |
1328 | 1328 |
1329 } // namespace chrome | 1329 } // namespace chrome |
OLD | NEW |