OLD | NEW |
---|---|
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this); | 100 ShellWindowRegistry::Get(profile_)->RemoveShellWindow(this); |
101 | 101 |
102 // Remove shutdown prevention. | 102 // Remove shutdown prevention. |
103 browser::EndKeepAlive(); | 103 browser::EndKeepAlive(); |
104 } | 104 } |
105 | 105 |
106 bool ShellWindow::IsFullscreenOrPending() const { | 106 bool ShellWindow::IsFullscreenOrPending() const { |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 void ShellWindow::RequestMediaAccessPermission( | |
111 content::WebContents* web_contents, | |
112 const content::MediaStreamRequest* request, | |
113 const content::MediaResponseCallback& callback) { | |
114 callback.Run(content::MediaStreamDevices()); | |
Evan Stade
2012/06/09 05:47:38
not yet implemented.
| |
115 } | |
116 | |
110 string16 ShellWindow::GetTitle() const { | 117 string16 ShellWindow::GetTitle() const { |
111 // WebContents::GetTitle() will return the page's URL if there's no <title> | 118 // WebContents::GetTitle() will return the page's URL if there's no <title> |
112 // specified. However, we'd prefer to show the name of the extension in that | 119 // specified. However, we'd prefer to show the name of the extension in that |
113 // case, so we directly inspect the NavigationEntry's title. | 120 // case, so we directly inspect the NavigationEntry's title. |
114 if (web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) | 121 if (web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) |
115 return UTF8ToUTF16(extension()->name()); | 122 return UTF8ToUTF16(extension()->name()); |
116 return web_contents()->GetTitle(); | 123 return web_contents()->GetTitle(); |
117 } | 124 } |
118 | 125 |
119 bool ShellWindow::OnMessageReceived(const IPC::Message& message) { | 126 bool ShellWindow::OnMessageReceived(const IPC::Message& message) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 } | 208 } |
202 | 209 |
203 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const { | 210 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const { |
204 return NULL; | 211 return NULL; |
205 } | 212 } |
206 | 213 |
207 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) { | 214 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) { |
208 extension_function_dispatcher_.Dispatch(params, | 215 extension_function_dispatcher_.Dispatch(params, |
209 web_contents_->GetRenderViewHost()); | 216 web_contents_->GetRenderViewHost()); |
210 } | 217 } |
OLD | NEW |