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

Side by Side Diff: chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.cc

Issue 12326168: Move <webview> API to chrome layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h"
6
7 #include <stdio.h>
8
9 #include "base/files/file_path.h"
10 #include "base/values.h"
11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/common/chrome_browser_plugin_messages.h"
13 #include "chrome/common/extensions/api/tabs.h"
14 #include "chrome/common/extensions/extension_messages.h"
15 #include "chrome/common/extensions/value_builder.h"
16 #include "content/public/browser/browser_plugin/browser_plugin_guest.h"
17 #include "content/public/browser/web_contents.h"
18
19 ChromeBrowserPluginGuestObserver::ChromeBrowserPluginGuestObserver(
20 content::BrowserPluginGuest* guest)
21 : content::BrowserPluginGuestObserver(guest) {
22 AddRef();
23 }
24
25 ChromeBrowserPluginGuestObserver::~ChromeBrowserPluginGuestObserver() {
26 }
27
28 void ChromeBrowserPluginGuestObserver::OnDestruct() {
29 Release();
30 }
31
32 bool ChromeBrowserPluginGuestObserver::OnMessageReceivedFromEmbedder(
33 const IPC::Message& message) {
34 bool handled = true;
35 IPC_BEGIN_MESSAGE_MAP(ChromeBrowserPluginGuestObserver, message)
36 IPC_MESSAGE_HANDLER(ChromeBrowserPluginHostMsg_Go, OnGo)
37 IPC_MESSAGE_UNHANDLED(handled = false)
38 IPC_END_MESSAGE_MAP()
39 return handled;
40 }
41
42 void ChromeBrowserPluginGuestObserver::OnGo(int relative_index) {
43 browser_plugin_guest()->GetWebContents()->GetController().GoToOffset(
44 relative_index);
45 }
46
47
OLDNEW
« no previous file with comments | « chrome/browser/browser_plugin/chrome_browser_plugin_guest_observer.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698