| 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/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
| 10 #include "chrome/browser/extensions/shell_window_geometry_cache.h" | 10 #include "chrome/browser/extensions/shell_window_geometry_cache.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 DCHECK(rvh); | 57 DCHECK(rvh); |
| 58 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 58 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 59 base::Bind(&ResourceDispatcherHost::BlockRequestsForRoute, | 59 base::Bind(&ResourceDispatcherHost::BlockRequestsForRoute, |
| 60 base::Unretained(ResourceDispatcherHost::Get()), | 60 base::Unretained(ResourceDispatcherHost::Get()), |
| 61 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); | 61 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace | 64 } // namespace |
| 65 | 65 |
| 66 ShellWindow::CreateParams::CreateParams() | 66 ShellWindow::CreateParams::CreateParams() |
| 67 : frame(ShellWindow::CreateParams::FRAME_CHROME), | 67 : frame(ShellWindow::CreateParams::FRAME_NONE), |
| 68 bounds(-1, -1, kDefaultWidth, kDefaultHeight), | 68 bounds(-1, -1, kDefaultWidth, kDefaultHeight), |
| 69 restore_position(true), restore_size(true) { | 69 restore_position(true), restore_size(true) { |
| 70 } | 70 } |
| 71 | 71 |
| 72 ShellWindow::CreateParams::~CreateParams() { | 72 ShellWindow::CreateParams::~CreateParams() { |
| 73 } | 73 } |
| 74 | 74 |
| 75 ShellWindow* ShellWindow::Create(Profile* profile, | 75 ShellWindow* ShellWindow::Create(Profile* profile, |
| 76 const extensions::Extension* extension, | 76 const extensions::Extension* extension, |
| 77 const GURL& url, | 77 const GURL& url, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 return; | 421 return; |
| 422 | 422 |
| 423 extensions::ShellWindowGeometryCache* cache = | 423 extensions::ShellWindowGeometryCache* cache = |
| 424 extensions::ExtensionSystem::Get(profile())-> | 424 extensions::ExtensionSystem::Get(profile())-> |
| 425 shell_window_geometry_cache(); | 425 shell_window_geometry_cache(); |
| 426 | 426 |
| 427 gfx::Rect bounds = native_window_->GetBounds(); | 427 gfx::Rect bounds = native_window_->GetBounds(); |
| 428 cache->SaveGeometry(extension()->id(), window_key_, bounds); | 428 cache->SaveGeometry(extension()->id(), window_key_, bounds); |
| 429 } | 429 } |
| 430 | 430 |
| OLD | NEW |