| 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/tabs/tabs_api.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 set_bounds = true; | 788 set_bounds = true; |
| 789 } | 789 } |
| 790 | 790 |
| 791 if (set_bounds) { | 791 if (set_bounds) { |
| 792 if (show_state == ui::SHOW_STATE_MINIMIZED || | 792 if (show_state == ui::SHOW_STATE_MINIMIZED || |
| 793 show_state == ui::SHOW_STATE_MAXIMIZED || | 793 show_state == ui::SHOW_STATE_MAXIMIZED || |
| 794 show_state == ui::SHOW_STATE_FULLSCREEN) { | 794 show_state == ui::SHOW_STATE_FULLSCREEN) { |
| 795 error_ = keys::kInvalidWindowStateError; | 795 error_ = keys::kInvalidWindowStateError; |
| 796 return false; | 796 return false; |
| 797 } | 797 } |
| 798 // TODO(varkha): Updating bounds during a drag can cause problems and a more |
| 799 // general solution is needed. See http://crbug.com/251813 . |
| 798 controller->window()->SetBounds(bounds); | 800 controller->window()->SetBounds(bounds); |
| 799 } | 801 } |
| 800 | 802 |
| 801 bool active_val = false; | 803 bool active_val = false; |
| 802 if (update_props->HasKey(keys::kFocusedKey)) { | 804 if (update_props->HasKey(keys::kFocusedKey)) { |
| 803 EXTENSION_FUNCTION_VALIDATE(update_props->GetBoolean( | 805 EXTENSION_FUNCTION_VALIDATE(update_props->GetBoolean( |
| 804 keys::kFocusedKey, &active_val)); | 806 keys::kFocusedKey, &active_val)); |
| 805 if (active_val) { | 807 if (active_val) { |
| 806 if (show_state == ui::SHOW_STATE_MINIMIZED) { | 808 if (show_state == ui::SHOW_STATE_MINIMIZED) { |
| 807 error_ = keys::kInvalidWindowStateError; | 809 error_ = keys::kInvalidWindowStateError; |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 execute_tab_id_ = tab_id; | 2069 execute_tab_id_ = tab_id; |
| 2068 details_ = details.Pass(); | 2070 details_ = details.Pass(); |
| 2069 return true; | 2071 return true; |
| 2070 } | 2072 } |
| 2071 | 2073 |
| 2072 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 2074 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
| 2073 return true; | 2075 return true; |
| 2074 } | 2076 } |
| 2075 | 2077 |
| 2076 } // namespace extensions | 2078 } // namespace extensions |
| OLD | NEW |