| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 *storage_partition_id = partition_str; | 157 *storage_partition_id = partition_str; |
| 158 *persist_storage = false; | 158 *persist_storage = false; |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 void RemoveWebViewEventListenersOnIOThread( | 162 void RemoveWebViewEventListenersOnIOThread( |
| 163 void* profile, | 163 void* profile, |
| 164 const std::string& extension_id, | 164 const std::string& extension_id, |
| 165 int embedder_process_id, | 165 int embedder_process_id, |
| 166 int view_instance_id) { | 166 int view_instance_id) { |
| 167 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 167 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 168 ExtensionWebRequestEventRouter::GetInstance()->RemoveWebViewEventListeners( | 168 ExtensionWebRequestEventRouter::GetInstance()->RemoveWebViewEventListeners( |
| 169 profile, | 169 profile, |
| 170 extension_id, | 170 extension_id, |
| 171 embedder_process_id, | 171 embedder_process_id, |
| 172 view_instance_id); | 172 view_instance_id); |
| 173 } | 173 } |
| 174 | 174 |
| 175 double ConvertZoomLevelToZoomFactor(double zoom_level) { | 175 double ConvertZoomLevelToZoomFactor(double zoom_level) { |
| 176 double zoom_factor = content::ZoomLevelToZoomFactor(zoom_level); | 176 double zoom_factor = content::ZoomLevelToZoomFactor(zoom_level); |
| 177 // Because the conversion from zoom level to zoom factor isn't perfect, the | 177 // Because the conversion from zoom level to zoom factor isn't perfect, the |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1409 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 1410 DispatchEventToView( | 1410 DispatchEventToView( |
| 1411 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1411 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
| 1412 } | 1412 } |
| 1413 // Since we changed fullscreen state, sending a Resize message ensures that | 1413 // Since we changed fullscreen state, sending a Resize message ensures that |
| 1414 // renderer/ sees the change. | 1414 // renderer/ sees the change. |
| 1415 web_contents()->GetRenderViewHost()->WasResized(); | 1415 web_contents()->GetRenderViewHost()->WasResized(); |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 } // namespace extensions | 1418 } // namespace extensions |
| OLD | NEW |