| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 | 2063 |
| 2064 void Browser::FindPrevious() { | 2064 void Browser::FindPrevious() { |
| 2065 content::RecordAction(UserMetricsAction("FindPrevious")); | 2065 content::RecordAction(UserMetricsAction("FindPrevious")); |
| 2066 FindInPage(true, false); | 2066 FindInPage(true, false); |
| 2067 } | 2067 } |
| 2068 | 2068 |
| 2069 void Browser::Zoom(content::PageZoom zoom) { | 2069 void Browser::Zoom(content::PageZoom zoom) { |
| 2070 if (is_devtools()) | 2070 if (is_devtools()) |
| 2071 return; | 2071 return; |
| 2072 | 2072 |
| 2073 RenderViewHost* host = GetSelectedWebContents()->GetRenderViewHost(); | 2073 content::RenderViewHost* host = GetSelectedWebContents()->GetRenderViewHost(); |
| 2074 if (zoom == content::PAGE_ZOOM_RESET) { | 2074 if (zoom == content::PAGE_ZOOM_RESET) { |
| 2075 host->SetZoomLevel(0); | 2075 host->SetZoomLevel(0); |
| 2076 content::RecordAction(UserMetricsAction("ZoomNormal")); | 2076 content::RecordAction(UserMetricsAction("ZoomNormal")); |
| 2077 return; | 2077 return; |
| 2078 } | 2078 } |
| 2079 | 2079 |
| 2080 double current_zoom_level = GetSelectedWebContents()->GetZoomLevel(); | 2080 double current_zoom_level = GetSelectedWebContents()->GetZoomLevel(); |
| 2081 double default_zoom_level = | 2081 double default_zoom_level = |
| 2082 profile_->GetPrefs()->GetDouble(prefs::kDefaultZoomLevel); | 2082 profile_->GetPrefs()->GetDouble(prefs::kDefaultZoomLevel); |
| 2083 | 2083 |
| (...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5636 ShowSingletonTabOverwritingNTP(params); | 5636 ShowSingletonTabOverwritingNTP(params); |
| 5637 } else { | 5637 } else { |
| 5638 LoginUIServiceFactory::GetForProfile( | 5638 LoginUIServiceFactory::GetForProfile( |
| 5639 profile()->GetOriginalProfile())->ShowLoginUI(); | 5639 profile()->GetOriginalProfile())->ShowLoginUI(); |
| 5640 } | 5640 } |
| 5641 } | 5641 } |
| 5642 | 5642 |
| 5643 void Browser::ToggleSpeechInput() { | 5643 void Browser::ToggleSpeechInput() { |
| 5644 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5644 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5645 } | 5645 } |
| OLD | NEW |