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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 335993002: Convert MIDI permission requests to use WebContents in preparation for switching the code to using … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/media/midi_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 18 matching lines...) Expand all
29 #include "content/browser/download/save_package.h" 29 #include "content/browser/download/save_package.h"
30 #include "content/browser/frame_host/cross_process_frame_connector.h" 30 #include "content/browser/frame_host/cross_process_frame_connector.h"
31 #include "content/browser/frame_host/interstitial_page_impl.h" 31 #include "content/browser/frame_host/interstitial_page_impl.h"
32 #include "content/browser/frame_host/navigation_entry_impl.h" 32 #include "content/browser/frame_host/navigation_entry_impl.h"
33 #include "content/browser/frame_host/navigator_impl.h" 33 #include "content/browser/frame_host/navigator_impl.h"
34 #include "content/browser/frame_host/render_frame_host_impl.h" 34 #include "content/browser/frame_host/render_frame_host_impl.h"
35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
36 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 36 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
37 #include "content/browser/host_zoom_map_impl.h" 37 #include "content/browser/host_zoom_map_impl.h"
38 #include "content/browser/loader/resource_dispatcher_host_impl.h" 38 #include "content/browser/loader/resource_dispatcher_host_impl.h"
39 #include "content/browser/media/midi_dispatcher_host.h"
39 #include "content/browser/message_port_message_filter.h" 40 #include "content/browser/message_port_message_filter.h"
40 #include "content/browser/message_port_service.h" 41 #include "content/browser/message_port_service.h"
41 #include "content/browser/power_save_blocker_impl.h" 42 #include "content/browser/power_save_blocker_impl.h"
42 #include "content/browser/renderer_host/render_process_host_impl.h" 43 #include "content/browser/renderer_host/render_process_host_impl.h"
43 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
44 #include "content/browser/renderer_host/render_view_host_impl.h" 45 #include "content/browser/renderer_host/render_view_host_impl.h"
45 #include "content/browser/renderer_host/render_widget_host_impl.h" 46 #include "content/browser/renderer_host/render_widget_host_impl.h"
46 #include "content/browser/renderer_host/render_widget_host_view_base.h" 47 #include "content/browser/renderer_host/render_widget_host_view_base.h"
47 #include "content/browser/site_instance_impl.h" 48 #include "content/browser/site_instance_impl.h"
48 #include "content/browser/web_contents/web_contents_view_guest.h" 49 #include "content/browser/web_contents/web_contents_view_guest.h"
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 1088
1088 // Listen for whether our opener gets destroyed. 1089 // Listen for whether our opener gets destroyed.
1089 if (opener_) 1090 if (opener_)
1090 AddDestructionObserver(opener_); 1091 AddDestructionObserver(opener_);
1091 1092
1092 registrar_.Add(this, 1093 registrar_.Add(this,
1093 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1094 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1094 NotificationService::AllBrowserContextsAndSources()); 1095 NotificationService::AllBrowserContextsAndSources());
1095 1096
1096 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); 1097 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this));
1098 midi_dispatcher_host_.reset(new MidiDispatcherHost(this));
1097 1099
1098 #if defined(OS_ANDROID) 1100 #if defined(OS_ANDROID)
1099 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1101 date_time_chooser_.reset(new DateTimeChooserAndroid());
1100 #endif 1102 #endif
1101 } 1103 }
1102 1104
1103 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { 1105 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) {
1104 RemoveDestructionObserver(web_contents); 1106 RemoveDestructionObserver(web_contents);
1105 1107
1106 // Clear the opener if it has been closed. 1108 // Clear the opener if it has been closed.
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after
4066 4068
4067 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 4069 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
4068 if (!delegate_) 4070 if (!delegate_)
4069 return; 4071 return;
4070 const gfx::Size new_size = GetPreferredSize(); 4072 const gfx::Size new_size = GetPreferredSize();
4071 if (new_size != old_size) 4073 if (new_size != old_size)
4072 delegate_->UpdatePreferredSize(this, new_size); 4074 delegate_->UpdatePreferredSize(this, new_size);
4073 } 4075 }
4074 4076
4075 } // namespace content 4077 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/media/midi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698