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 "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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 return delegate_->IsFullscreenForCurrentTab(); | 1229 return delegate_->IsFullscreenForCurrentTab(); |
1230 } | 1230 } |
1231 | 1231 |
1232 blink::WebDisplayMode RenderViewHostImpl::GetDisplayMode() const { | 1232 blink::WebDisplayMode RenderViewHostImpl::GetDisplayMode() const { |
1233 return delegate_->GetDisplayMode(); | 1233 return delegate_->GetDisplayMode(); |
1234 } | 1234 } |
1235 | 1235 |
1236 void RenderViewHostImpl::OnFocus() { | 1236 void RenderViewHostImpl::OnFocus() { |
1237 // Note: We allow focus and blur from swapped out RenderViewHosts, even when | 1237 // Note: We allow focus and blur from swapped out RenderViewHosts, even when |
1238 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI). | 1238 // the active RenderViewHost is in a different BrowsingInstance (e.g., WebUI). |
1239 delegate_->Activate(); | 1239 // TODO(johnme): Can we sometimes be certain this was for a user gesture? |
| 1240 delegate_->Activate(false /* user_gesture */); |
1240 } | 1241 } |
1241 | 1242 |
1242 void RenderViewHostImpl::OnBlur() { | 1243 void RenderViewHostImpl::OnBlur() { |
1243 delegate_->Deactivate(); | 1244 delegate_->Deactivate(); |
1244 } | 1245 } |
1245 | 1246 |
1246 gfx::Rect RenderViewHostImpl::GetRootWindowResizerRect() const { | 1247 gfx::Rect RenderViewHostImpl::GetRootWindowResizerRect() const { |
1247 return delegate_->GetRootWindowResizerRect(); | 1248 return delegate_->GetRootWindowResizerRect(); |
1248 } | 1249 } |
1249 | 1250 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1425 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1425 policy->GrantReadFile(GetProcess()->GetID(), file); | 1426 policy->GrantReadFile(GetProcess()->GetID(), file); |
1426 } | 1427 } |
1427 } | 1428 } |
1428 | 1429 |
1429 void RenderViewHostImpl::SelectWordAroundCaret() { | 1430 void RenderViewHostImpl::SelectWordAroundCaret() { |
1430 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1431 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1431 } | 1432 } |
1432 | 1433 |
1433 } // namespace content | 1434 } // namespace content |
OLD | NEW |