| 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" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 14 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 15 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 15 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/chrome_page_zoom.h" | |
| 18 #include "chrome/browser/devtools/devtools_window.h" | 17 #include "chrome/browser/devtools/devtools_window.h" |
| 19 #include "chrome/browser/dom_distiller/tab_utils.h" | 18 #include "chrome/browser/dom_distiller/tab_utils.h" |
| 20 #include "chrome/browser/favicon/favicon_tab_helper.h" | 19 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 21 #include "chrome/browser/lifetime/application_lifetime.h" | 20 #include "chrome/browser/lifetime/application_lifetime.h" |
| 22 #include "chrome/browser/platform_util.h" | 21 #include "chrome/browser/platform_util.h" |
| 23 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 22 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/rlz/rlz.h" | 24 #include "chrome/browser/rlz/rlz.h" |
| 26 #include "chrome/browser/search/search.h" | 25 #include "chrome/browser/search/search.h" |
| 27 #include "chrome/browser/sessions/session_service_factory.h" | 26 #include "chrome/browser/sessions/session_service_factory.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 54 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 53 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 55 #include "chrome/browser/upgrade_detector.h" | 54 #include "chrome/browser/upgrade_detector.h" |
| 56 #include "chrome/common/chrome_switches.h" | 55 #include "chrome/common/chrome_switches.h" |
| 57 #include "chrome/common/chrome_version_info.h" | 56 #include "chrome/common/chrome_version_info.h" |
| 58 #include "chrome/common/content_restriction.h" | 57 #include "chrome/common/content_restriction.h" |
| 59 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 60 #include "components/bookmarks/browser/bookmark_model.h" | 59 #include "components/bookmarks/browser/bookmark_model.h" |
| 61 #include "components/bookmarks/browser/bookmark_utils.h" | 60 #include "components/bookmarks/browser/bookmark_utils.h" |
| 62 #include "components/google/core/browser/google_util.h" | 61 #include "components/google/core/browser/google_util.h" |
| 63 #include "components/translate/core/browser/language_state.h" | 62 #include "components/translate/core/browser/language_state.h" |
| 63 #include "components/ui/zoom/page_zoom.h" |
| 64 #include "components/ui/zoom/zoom_controller.h" | 64 #include "components/ui/zoom/zoom_controller.h" |
| 65 #include "components/web_modal/popup_manager.h" | 65 #include "components/web_modal/popup_manager.h" |
| 66 #include "content/public/browser/devtools_agent_host.h" | 66 #include "content/public/browser/devtools_agent_host.h" |
| 67 #include "content/public/browser/navigation_controller.h" | 67 #include "content/public/browser/navigation_controller.h" |
| 68 #include "content/public/browser/navigation_entry.h" | 68 #include "content/public/browser/navigation_entry.h" |
| 69 #include "content/public/browser/notification_service.h" | 69 #include "content/public/browser/notification_service.h" |
| 70 #include "content/public/browser/page_navigator.h" | 70 #include "content/public/browser/page_navigator.h" |
| 71 #include "content/public/browser/render_view_host.h" | 71 #include "content/public/browser/render_view_host.h" |
| 72 #include "content/public/browser/render_widget_host_view.h" | 72 #include "content/public/browser/render_widget_host_view.h" |
| 73 #include "content/public/browser/user_metrics.h" | 73 #include "content/public/browser/user_metrics.h" |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 // Incognito window it's the newest value of the find pboard content and | 964 // Incognito window it's the newest value of the find pboard content and |
| 965 // user-typed text. | 965 // user-typed text. |
| 966 FindBar* find_bar = browser->GetFindBarController()->find_bar(); | 966 FindBar* find_bar = browser->GetFindBarController()->find_bar(); |
| 967 find_text = find_bar->GetFindText(); | 967 find_text = find_bar->GetFindText(); |
| 968 #endif | 968 #endif |
| 969 find_helper->StartFinding(find_text, forward_direction, false); | 969 find_helper->StartFinding(find_text, forward_direction, false); |
| 970 } | 970 } |
| 971 } | 971 } |
| 972 | 972 |
| 973 void Zoom(Browser* browser, content::PageZoom zoom) { | 973 void Zoom(Browser* browser, content::PageZoom zoom) { |
| 974 chrome_page_zoom::Zoom(browser->tab_strip_model()->GetActiveWebContents(), | 974 ui_zoom::PageZoom::Zoom(browser->tab_strip_model()->GetActiveWebContents(), |
| 975 zoom); | 975 zoom); |
| 976 } | 976 } |
| 977 | 977 |
| 978 void FocusToolbar(Browser* browser) { | 978 void FocusToolbar(Browser* browser) { |
| 979 content::RecordAction(UserMetricsAction("FocusToolbar")); | 979 content::RecordAction(UserMetricsAction("FocusToolbar")); |
| 980 browser->window()->FocusToolbar(); | 980 browser->window()->FocusToolbar(); |
| 981 } | 981 } |
| 982 | 982 |
| 983 void FocusLocationBar(Browser* browser) { | 983 void FocusLocationBar(Browser* browser) { |
| 984 content::RecordAction(UserMetricsAction("FocusLocation")); | 984 content::RecordAction(UserMetricsAction("FocusLocation")); |
| 985 browser->window()->SetFocusToLocationBar(true); | 985 browser->window()->SetFocusToLocationBar(true); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 browser->host_desktop_type())); | 1276 browser->host_desktop_type())); |
| 1277 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1277 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1278 | 1278 |
| 1279 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1279 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1280 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1280 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1281 app_browser->window()->Show(); | 1281 app_browser->window()->Show(); |
| 1282 } | 1282 } |
| 1283 #endif // defined(ENABLE_EXTENSIONS) | 1283 #endif // defined(ENABLE_EXTENSIONS) |
| 1284 | 1284 |
| 1285 } // namespace chrome | 1285 } // namespace chrome |
| OLD | NEW |