| 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/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 44 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
| 45 #include "chrome/browser/ui/browser_tabstrip.h" | 45 #include "chrome/browser/ui/browser_tabstrip.h" |
| 46 #include "chrome/browser/ui/browser_window.h" | 46 #include "chrome/browser/ui/browser_window.h" |
| 47 #include "chrome/browser/ui/chrome_pages.h" | 47 #include "chrome/browser/ui/chrome_pages.h" |
| 48 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 48 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 49 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 49 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 50 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 50 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| 51 #include "chrome/browser/ui/omnibox/location_bar.h" | 51 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 52 #include "chrome/browser/ui/status_bubble.h" | 52 #include "chrome/browser/ui/status_bubble.h" |
| 53 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 53 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 54 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | |
| 55 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" | 54 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
| 56 #include "chrome/browser/upgrade_detector.h" | 55 #include "chrome/browser/upgrade_detector.h" |
| 57 #include "chrome/browser/web_applications/web_app.h" | 56 #include "chrome/browser/web_applications/web_app.h" |
| 58 #include "chrome/common/chrome_content_client.h" | 57 #include "chrome/common/chrome_content_client.h" |
| 59 #include "chrome/common/chrome_notification_types.h" | 58 #include "chrome/common/chrome_notification_types.h" |
| 60 #include "chrome/common/chrome_switches.h" | 59 #include "chrome/common/chrome_switches.h" |
| 61 #include "chrome/common/pref_names.h" | 60 #include "chrome/common/pref_names.h" |
| 61 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 62 #include "content/public/browser/devtools_agent_host.h" | 62 #include "content/public/browser/devtools_agent_host.h" |
| 63 #include "content/public/browser/navigation_controller.h" | 63 #include "content/public/browser/navigation_controller.h" |
| 64 #include "content/public/browser/navigation_entry.h" | 64 #include "content/public/browser/navigation_entry.h" |
| 65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
| 66 #include "content/public/browser/page_navigator.h" | 66 #include "content/public/browser/page_navigator.h" |
| 67 #include "content/public/browser/render_view_host.h" | 67 #include "content/public/browser/render_view_host.h" |
| 68 #include "content/public/browser/user_metrics.h" | 68 #include "content/public/browser/user_metrics.h" |
| 69 #include "content/public/browser/web_contents.h" | 69 #include "content/public/browser/web_contents.h" |
| 70 #include "content/public/browser/web_contents_view.h" | 70 #include "content/public/browser/web_contents_view.h" |
| 71 #include "content/public/common/content_restriction.h" | 71 #include "content/public/common/content_restriction.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 88 const char kOsOverrideForTabletSite[] = "Linux; Android 4.0.3"; | 88 const char kOsOverrideForTabletSite[] = "Linux; Android 4.0.3"; |
| 89 } | 89 } |
| 90 | 90 |
| 91 using content::NavigationController; | 91 using content::NavigationController; |
| 92 using content::NavigationEntry; | 92 using content::NavigationEntry; |
| 93 using content::OpenURLParams; | 93 using content::OpenURLParams; |
| 94 using content::Referrer; | 94 using content::Referrer; |
| 95 using content::SSLStatus; | 95 using content::SSLStatus; |
| 96 using content::UserMetricsAction; | 96 using content::UserMetricsAction; |
| 97 using content::WebContents; | 97 using content::WebContents; |
| 98 using web_modal::WebContentsModalDialogManager; |
| 98 | 99 |
| 99 namespace chrome { | 100 namespace chrome { |
| 100 namespace { | 101 namespace { |
| 101 | 102 |
| 102 void BookmarkCurrentPageInternal(Browser* browser, bool from_star) { | 103 void BookmarkCurrentPageInternal(Browser* browser, bool from_star) { |
| 103 content::RecordAction(UserMetricsAction("Star")); | 104 content::RecordAction(UserMetricsAction("Star")); |
| 104 | 105 |
| 105 BookmarkModel* model = | 106 BookmarkModel* model = |
| 106 BookmarkModelFactory::GetForProfile(browser->profile()); | 107 BookmarkModelFactory::GetForProfile(browser->profile()); |
| 107 if (!model || !model->loaded()) | 108 if (!model || !model->loaded()) |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), | 1095 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), |
| 1095 browser->host_desktop_type())); | 1096 browser->host_desktop_type())); |
| 1096 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1097 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1097 | 1098 |
| 1098 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1099 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1099 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1100 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1100 app_browser->window()->Show(); | 1101 app_browser->window()->Show(); |
| 1101 } | 1102 } |
| 1102 | 1103 |
| 1103 } // namespace chrome | 1104 } // namespace chrome |
| OLD | NEW |