| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 browser->host_desktop_type())); | 1329 browser->host_desktop_type())); |
| 1330 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1330 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1331 | 1331 |
| 1332 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1332 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1333 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1333 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1334 app_browser->window()->Show(); | 1334 app_browser->window()->Show(); |
| 1335 } | 1335 } |
| 1336 #endif // defined(ENABLE_EXTENSIONS) | 1336 #endif // defined(ENABLE_EXTENSIONS) |
| 1337 | 1337 |
| 1338 } // namespace chrome | 1338 } // namespace chrome |
| OLD | NEW |