Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1481)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 652673002: NOT FOR REVIEW: Modify ToggleFullscreenMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixPowerBlockerNonMedia
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 return; 1035 return;
1036 1036
1037 HostZoomMapImpl* host_zoom_map = 1037 HostZoomMapImpl* host_zoom_map =
1038 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext( 1038 static_cast<HostZoomMapImpl*>(HostZoomMap::GetDefaultForBrowserContext(
1039 GetProcess()->GetBrowserContext())); 1039 GetProcess()->GetBrowserContext()));
1040 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), 1040 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
1041 GetRoutingID(), 1041 GetRoutingID(),
1042 host_zoom_map->GetDefaultZoomLevel()); 1042 host_zoom_map->GetDefaultZoomLevel());
1043 } 1043 }
1044 1044
1045 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) { 1045 void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen, bool is_video ) {
1046 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1046 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1047 delegate_->ToggleFullscreenMode(enter_fullscreen); 1047 delegate_->ToggleFullscreenMode(enter_fullscreen, is_video);
1048 // We need to notify the contents that its fullscreen state has changed. This 1048 // We need to notify the contents that its fullscreen state has changed. This
1049 // is done as part of the resize message. 1049 // is done as part of the resize message.
1050 WasResized(); 1050 WasResized();
1051 } 1051 }
1052 1052
1053 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( 1053 void RenderViewHostImpl::OnDidContentsPreferredSizeChange(
1054 const gfx::Size& new_size) { 1054 const gfx::Size& new_size) {
1055 delegate_->UpdatePreferredSize(new_size); 1055 delegate_->UpdatePreferredSize(new_size);
1056 } 1056 }
1057 1057
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 const base::string16& content, 1250 const base::string16& content,
1251 size_t start_offset, 1251 size_t start_offset,
1252 size_t end_offset) { 1252 size_t end_offset) {
1253 if (!view_) 1253 if (!view_)
1254 return; 1254 return;
1255 view_->OnTextSurroundingSelectionResponse(content, start_offset, end_offset); 1255 view_->OnTextSurroundingSelectionResponse(content, start_offset, end_offset);
1256 } 1256 }
1257 1257
1258 void RenderViewHostImpl::ExitFullscreen() { 1258 void RenderViewHostImpl::ExitFullscreen() {
1259 RejectMouseLockOrUnlockIfNecessary(); 1259 RejectMouseLockOrUnlockIfNecessary();
1260
1261 bool is_video = true; // TODO(igsolla): find out how to retrieve this value!!
1262
1260 // Notify delegate_ and renderer of fullscreen state change. 1263 // Notify delegate_ and renderer of fullscreen state change.
1261 OnToggleFullscreen(false); 1264 OnToggleFullscreen(false, is_video);
1262 } 1265 }
1263 1266
1264 WebPreferences RenderViewHostImpl::GetWebkitPreferences() { 1267 WebPreferences RenderViewHostImpl::GetWebkitPreferences() {
1265 if (!web_preferences_.get()) { 1268 if (!web_preferences_.get()) {
1266 OnWebkitPreferencesChanged(); 1269 OnWebkitPreferencesChanged();
1267 } 1270 }
1268 return *web_preferences_; 1271 return *web_preferences_;
1269 } 1272 }
1270 1273
1271 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) { 1274 void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 FrameTree* frame_tree = delegate_->GetFrameTree(); 1395 FrameTree* frame_tree = delegate_->GetFrameTree();
1393 1396
1394 frame_tree->ResetForMainFrameSwap(); 1397 frame_tree->ResetForMainFrameSwap();
1395 } 1398 }
1396 1399
1397 void RenderViewHostImpl::SelectWordAroundCaret() { 1400 void RenderViewHostImpl::SelectWordAroundCaret() {
1398 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1401 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1399 } 1402 }
1400 1403
1401 } // namespace content 1404 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698