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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 10542092: Refactor the content interface for RequestMediaAccessPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 "chrome/browser/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/extensions/shell_window_registry.h" 9 #include "chrome/browser/extensions/shell_window_registry.h"
10 #include "chrome/browser/file_select_helper.h" 10 #include "chrome/browser/file_select_helper.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 registrar_.RemoveAll(); 99 registrar_.RemoveAll();
100 100
101 // Remove shutdown prevention. 101 // Remove shutdown prevention.
102 browser::EndKeepAlive(); 102 browser::EndKeepAlive();
103 } 103 }
104 104
105 bool ShellWindow::IsFullscreenOrPending() const { 105 bool ShellWindow::IsFullscreenOrPending() const {
106 return false; 106 return false;
107 } 107 }
108 108
109 void ShellWindow::RequestMediaAccessPermission(
110 content::WebContents* web_contents,
111 const content::MediaStreamRequest* request,
112 const content::MediaResponseCallback& callback) {
113 callback.Run(content::MediaStreamDevices());
114 }
115
109 void ShellWindow::OnNativeClose() { 116 void ShellWindow::OnNativeClose() {
110 ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this); 117 ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this);
111 delete this; 118 delete this;
112 } 119 }
113 120
114 string16 ShellWindow::GetTitle() const { 121 string16 ShellWindow::GetTitle() const {
115 // WebContents::GetTitle() will return the page's URL if there's no <title> 122 // WebContents::GetTitle() will return the page's URL if there's no <title>
116 // specified. However, we'd prefer to show the name of the extension in that 123 // specified. However, we'd prefer to show the name of the extension in that
117 // case, so we directly inspect the NavigationEntry's title. 124 // case, so we directly inspect the NavigationEntry's title.
118 if (!web_contents()->GetController().GetActiveEntry() || 125 if (!web_contents()->GetController().GetActiveEntry() ||
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 213 }
207 214
208 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const { 215 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const {
209 return NULL; 216 return NULL;
210 } 217 }
211 218
212 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) { 219 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) {
213 extension_function_dispatcher_.Dispatch(params, 220 extension_function_dispatcher_.Dispatch(params,
214 web_contents_->GetRenderViewHost()); 221 web_contents_->GetRenderViewHost());
215 } 222 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/browser/ui/media_stream_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698