| 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/extensions/api/app_window/app_window_api.h" | 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 private: | 82 private: |
| 83 scoped_refptr<AppWindowCreateFunction> delayed_create_function_; | 83 scoped_refptr<AppWindowCreateFunction> delayed_create_function_; |
| 84 content::NotificationRegistrar registrar_; | 84 content::NotificationRegistrar registrar_; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 void SetCreateResultFromShellWindow(ShellWindow* window, | 87 void SetCreateResultFromShellWindow(ShellWindow* window, |
| 88 base::DictionaryValue* result) { | 88 base::DictionaryValue* result) { |
| 89 result->SetBoolean("fullscreen", window->GetBaseWindow()->IsFullscreen()); | 89 result->SetBoolean("fullscreen", window->GetBaseWindow()->IsFullscreen()); |
| 90 result->SetBoolean("minimized", window->GetBaseWindow()->IsMinimized()); | 90 result->SetBoolean("minimized", window->GetBaseWindow()->IsMinimized()); |
| 91 result->SetBoolean("maximized", window->GetBaseWindow()->IsMaximized()); | 91 result->SetBoolean("maximized", window->GetBaseWindow()->IsMaximized()); |
| 92 DictionaryValue* boundsValue = new DictionaryValue(); | 92 base::DictionaryValue* boundsValue = new base::DictionaryValue(); |
| 93 gfx::Rect bounds = window->GetClientBounds(); | 93 gfx::Rect bounds = window->GetClientBounds(); |
| 94 boundsValue->SetInteger("left", bounds.x()); | 94 boundsValue->SetInteger("left", bounds.x()); |
| 95 boundsValue->SetInteger("top", bounds.y()); | 95 boundsValue->SetInteger("top", bounds.y()); |
| 96 boundsValue->SetInteger("width", bounds.width()); | 96 boundsValue->SetInteger("width", bounds.width()); |
| 97 boundsValue->SetInteger("height", bounds.height()); | 97 boundsValue->SetInteger("height", bounds.height()); |
| 98 result->Set("bounds", boundsValue); | 98 result->Set("bounds", boundsValue); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace | 101 } // namespace |
| 102 | 102 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { | 312 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { |
| 313 new DevToolsRestorer(this, created_view); | 313 new DevToolsRestorer(this, created_view); |
| 314 return true; | 314 return true; |
| 315 } | 315 } |
| 316 | 316 |
| 317 SendResponse(true); | 317 SendResponse(true); |
| 318 return true; | 318 return true; |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace extensions | 321 } // namespace extensions |
| OLD | NEW |