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 29 matching lines...) Expand all Loading... |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 ShellWindow::CreateParams::CreateParams() | 42 ShellWindow::CreateParams::CreateParams() |
43 : frame(ShellWindow::CreateParams::FRAME_CHROME), | 43 : frame(ShellWindow::CreateParams::FRAME_CHROME), |
44 bounds(10, 10, kDefaultWidth, kDefaultHeight) { | 44 bounds(10, 10, kDefaultWidth, kDefaultHeight) { |
45 } | 45 } |
46 | 46 |
47 ShellWindow* ShellWindow::Create(Profile* profile, | 47 ShellWindow* ShellWindow::Create(Profile* profile, |
48 const extensions::Extension* extension, | 48 const extensions::Extension* extension, |
49 const GURL& url, | 49 const GURL& url, |
50 const ShellWindow::CreateParams params) { | 50 const ShellWindow::CreateParams& params) { |
51 // This object will delete itself when the window is closed. | 51 // This object will delete itself when the window is closed. |
52 ShellWindow* window = | 52 ShellWindow* window = |
53 ShellWindow::CreateImpl(profile, extension, url, params); | 53 ShellWindow::CreateImpl(profile, extension, url, params); |
54 ShellWindowRegistry::Get(profile)->AddShellWindow(window); | 54 ShellWindowRegistry::Get(profile)->AddShellWindow(window); |
55 return window; | 55 return window; |
56 } | 56 } |
57 | 57 |
58 ShellWindow::ShellWindow(Profile* profile, | 58 ShellWindow::ShellWindow(Profile* profile, |
59 const extensions::Extension* extension, | 59 const extensions::Extension* extension, |
60 const GURL& url) | 60 const GURL& url) |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 | 207 |
208 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const { | 208 ExtensionWindowController* ShellWindow::GetExtensionWindowController() const { |
209 return NULL; | 209 return NULL; |
210 } | 210 } |
211 | 211 |
212 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) { | 212 void ShellWindow::OnRequest(const ExtensionHostMsg_Request_Params& params) { |
213 extension_function_dispatcher_.Dispatch(params, | 213 extension_function_dispatcher_.Dispatch(params, |
214 web_contents_->GetRenderViewHost()); | 214 web_contents_->GetRenderViewHost()); |
215 } | 215 } |
OLD | NEW |