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

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

Issue 10919075: Move android mediaplayer from render process to browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 8 years, 3 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/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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "ui/gfx/native_widget_types.h" 63 #include "ui/gfx/native_widget_types.h"
64 #include "webkit/fileapi/isolated_context.h" 64 #include "webkit/fileapi/isolated_context.h"
65 #include "webkit/glue/webdropdata.h" 65 #include "webkit/glue/webdropdata.h"
66 #include "webkit/glue/webkit_glue.h" 66 #include "webkit/glue/webkit_glue.h"
67 67
68 #if defined(OS_WIN) 68 #if defined(OS_WIN)
69 #include "base/win/windows_version.h" 69 #include "base/win/windows_version.h"
70 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFact ory.h" 70 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFact ory.h"
71 #elif defined(OS_MACOSX) 71 #elif defined(OS_MACOSX)
72 #include "content/browser/renderer_host/popup_menu_helper_mac.h" 72 #include "content/browser/renderer_host/popup_menu_helper_mac.h"
73 #elif defined(OS_ANDROID)
74 #include "content/browser/android/media_player_manager_android.h"
73 #endif 75 #endif
74 76
75 using base::TimeDelta; 77 using base::TimeDelta;
76 using content::NativeWebKeyboardEvent; 78 using content::NativeWebKeyboardEvent;
77 using content::RenderViewHostDelegateView; 79 using content::RenderViewHostDelegateView;
78 using WebKit::WebConsoleMessage; 80 using WebKit::WebConsoleMessage;
79 using WebKit::WebDragOperation; 81 using WebKit::WebDragOperation;
80 using WebKit::WebDragOperationNone; 82 using WebKit::WebDragOperationNone;
81 using WebKit::WebDragOperationsMask; 83 using WebKit::WebDragOperationsMask;
82 using WebKit::WebInputEvent; 84 using WebKit::WebInputEvent;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 CHECK(delegate_); // http://crbug.com/82827 179 CHECK(delegate_); // http://crbug.com/82827
178 180
179 GetProcess()->EnableSendQueue(); 181 GetProcess()->EnableSendQueue();
180 182
181 content::GetContentClient()->browser()->RenderViewHostCreated(this); 183 content::GetContentClient()->browser()->RenderViewHostCreated(this);
182 184
183 content::NotificationService::current()->Notify( 185 content::NotificationService::current()->Notify(
184 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, 186 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
185 content::Source<RenderViewHost>(this), 187 content::Source<RenderViewHost>(this),
186 content::NotificationService::NoDetails()); 188 content::NotificationService::NoDetails());
189
190 #if defined(OS_ANDROID)
191 media_player_manager_ = new MediaPlayerManagerAndroid(this);
192 #endif
187 } 193 }
188 194
189 RenderViewHostImpl::~RenderViewHostImpl() { 195 RenderViewHostImpl::~RenderViewHostImpl() {
190 FOR_EACH_OBSERVER( 196 FOR_EACH_OBSERVER(
191 content::RenderViewHostObserver, observers_, RenderViewHostDestruction()); 197 content::RenderViewHostObserver, observers_, RenderViewHostDestruction());
192 198
193 content::NotificationService::current()->Notify( 199 content::NotificationService::current()->Notify(
194 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, 200 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
195 content::Source<RenderViewHost>(this), 201 content::Source<RenderViewHost>(this),
196 content::NotificationService::NoDetails()); 202 content::NotificationService::NoDetails());
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 // can cause navigations to be ignored in OnMsgNavigate. 1899 // can cause navigations to be ignored in OnMsgNavigate.
1894 is_waiting_for_beforeunload_ack_ = false; 1900 is_waiting_for_beforeunload_ack_ = false;
1895 is_waiting_for_unload_ack_ = false; 1901 is_waiting_for_unload_ack_ = false;
1896 } 1902 }
1897 1903
1898 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1904 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1899 STLDeleteValues(&power_save_blockers_); 1905 STLDeleteValues(&power_save_blockers_);
1900 } 1906 }
1901 1907
1902 } // namespace content 1908 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698