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

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

Issue 318753010: Introduce the ENABLE_BROWSER_CDMS macro. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MEDIA_EXPORT Created 6 years, 6 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "ui/base/ui_base_switches.h" 84 #include "ui/base/ui_base_switches.h"
85 #include "ui/gfx/image/image_skia.h" 85 #include "ui/gfx/image/image_skia.h"
86 #include "ui/gfx/native_widget_types.h" 86 #include "ui/gfx/native_widget_types.h"
87 #include "ui/native_theme/native_theme_switches.h" 87 #include "ui/native_theme/native_theme_switches.h"
88 #include "ui/shell_dialogs/selected_file_info.h" 88 #include "ui/shell_dialogs/selected_file_info.h"
89 #include "url/url_constants.h" 89 #include "url/url_constants.h"
90 #include "webkit/browser/fileapi/isolated_context.h" 90 #include "webkit/browser/fileapi/isolated_context.h"
91 91
92 #if defined(OS_MACOSX) 92 #if defined(OS_MACOSX)
93 #include "content/browser/renderer_host/popup_menu_helper_mac.h" 93 #include "content/browser/renderer_host/popup_menu_helper_mac.h"
94 #elif defined(OS_ANDROID)
95 #include "content/browser/media/android/media_web_contents_observer.h"
96 #elif defined(OS_WIN) 94 #elif defined(OS_WIN)
97 #include "base/win/win_util.h" 95 #include "base/win/win_util.h"
98 #endif 96 #endif
99 97
98 #if defined(ENABLE_BROWSER_CDMS)
99 #include "content/browser/media/media_web_contents_observer.h"
100 #endif
101
100 using base::TimeDelta; 102 using base::TimeDelta;
101 using blink::WebConsoleMessage; 103 using blink::WebConsoleMessage;
102 using blink::WebDragOperation; 104 using blink::WebDragOperation;
103 using blink::WebDragOperationNone; 105 using blink::WebDragOperationNone;
104 using blink::WebDragOperationsMask; 106 using blink::WebDragOperationsMask;
105 using blink::WebInputEvent; 107 using blink::WebInputEvent;
106 using blink::WebMediaPlayerAction; 108 using blink::WebMediaPlayerAction;
107 using blink::WebPluginAction; 109 using blink::WebPluginAction;
108 110
109 namespace content { 111 namespace content {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 218 }
217 219
218 if (ResourceDispatcherHostImpl::Get()) { 220 if (ResourceDispatcherHostImpl::Get()) {
219 BrowserThread::PostTask( 221 BrowserThread::PostTask(
220 BrowserThread::IO, FROM_HERE, 222 BrowserThread::IO, FROM_HERE,
221 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated, 223 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated,
222 base::Unretained(ResourceDispatcherHostImpl::Get()), 224 base::Unretained(ResourceDispatcherHostImpl::Get()),
223 GetProcess()->GetID(), GetRoutingID())); 225 GetProcess()->GetID(), GetRoutingID()));
224 } 226 }
225 227
226 #if defined(OS_ANDROID) 228 #if defined(ENABLE_BROWSER_CDMS)
227 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); 229 media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
228 #endif 230 #endif
229 231
230 unload_event_monitor_timeout_.reset(new TimeoutMonitor(base::Bind( 232 unload_event_monitor_timeout_.reset(new TimeoutMonitor(base::Bind(
231 &RenderViewHostImpl::OnSwappedOut, weak_factory_.GetWeakPtr(), true))); 233 &RenderViewHostImpl::OnSwappedOut, weak_factory_.GetWeakPtr(), true)));
232 } 234 }
233 235
234 RenderViewHostImpl::~RenderViewHostImpl() { 236 RenderViewHostImpl::~RenderViewHostImpl() {
235 if (ResourceDispatcherHostImpl::Get()) { 237 if (ResourceDispatcherHostImpl::Get()) {
236 BrowserThread::PostTask( 238 BrowserThread::PostTask(
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 FrameTree* frame_tree = delegate_->GetFrameTree(); 1677 FrameTree* frame_tree = delegate_->GetFrameTree();
1676 1678
1677 frame_tree->ResetForMainFrameSwap(); 1679 frame_tree->ResetForMainFrameSwap();
1678 } 1680 }
1679 1681
1680 void RenderViewHostImpl::SelectWordAroundCaret() { 1682 void RenderViewHostImpl::SelectWordAroundCaret() {
1681 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1683 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1682 } 1684 }
1683 1685
1684 } // namespace content 1686 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698