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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 10960003: Browser Plugin: Implement Back, Forward, and Go. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 8 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 | Annotate | Revision Log
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/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 return new BrowserPluginGuest(instance_id, web_contents, render_view_host); 61 return new BrowserPluginGuest(instance_id, web_contents, render_view_host);
62 } 62 }
63 63
64 bool BrowserPluginGuest::ViewTakeFocus(bool reverse) { 64 bool BrowserPluginGuest::ViewTakeFocus(bool reverse) {
65 SendMessageToEmbedder( 65 SendMessageToEmbedder(
66 new BrowserPluginMsg_AdvanceFocus(instance_id(), reverse)); 66 new BrowserPluginMsg_AdvanceFocus(instance_id(), reverse));
67 return true; 67 return true;
68 } 68 }
69 69
70 void BrowserPluginGuest::Go(int relative_index) {
71 web_contents()->GetController().GoToOffset(relative_index);
72 }
73
70 void BrowserPluginGuest::RendererUnresponsive(WebContents* source) { 74 void BrowserPluginGuest::RendererUnresponsive(WebContents* source) {
71 base::ProcessHandle process_handle = 75 base::ProcessHandle process_handle =
72 web_contents()->GetRenderProcessHost()->GetHandle(); 76 web_contents()->GetRenderProcessHost()->GetHandle();
73 base::KillProcess(process_handle, RESULT_CODE_HUNG, false); 77 base::KillProcess(process_handle, RESULT_CODE_HUNG, false);
74 } 78 }
75 79
76 void BrowserPluginGuest::SetIsAcceptingTouchEvents(bool accept) { 80 void BrowserPluginGuest::SetIsAcceptingTouchEvents(bool accept) {
77 SendMessageToEmbedder( 81 SendMessageToEmbedder(
78 new BrowserPluginMsg_ShouldAcceptTouchEvents(instance_id(), accept)); 82 new BrowserPluginMsg_ShouldAcceptTouchEvents(instance_id(), accept));
79 } 83 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 iter.Advance(); 297 iter.Advance();
294 } 298 }
295 } 299 }
296 300
297 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 301 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
298 DCHECK(embedder_render_process_host()); 302 DCHECK(embedder_render_process_host());
299 embedder_render_process_host()->Send(msg); 303 embedder_render_process_host()->Send(msg);
300 } 304 }
301 305
302 } // namespace content 306 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698