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 | 5 |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 app_window_->GetBaseWindow()->Activate(); | 825 app_window_->GetBaseWindow()->Activate(); |
826 if (!app_window_->GetBaseWindow()->IsActive()) { | 826 if (!app_window_->GetBaseWindow()->IsActive()) { |
827 waiting_ = true; | 827 waiting_ = true; |
828 content::RunMessageLoop(); | 828 content::RunMessageLoop(); |
829 } | 829 } |
830 } | 830 } |
831 | 831 |
832 // AppWindowRegistry::Observer: | 832 // AppWindowRegistry::Observer: |
833 void OnAppWindowActivated(AppWindow* app_window) override { | 833 void OnAppWindowActivated(AppWindow* app_window) override { |
834 if (app_window_ == app_window && waiting_) { | 834 if (app_window_ == app_window && waiting_) { |
835 base::MessageLoopForUI::current()->Quit(); | 835 base::MessageLoopForUI::current()->QuitWhenIdle(); |
836 waiting_ = false; | 836 waiting_ = false; |
837 } | 837 } |
838 } | 838 } |
839 | 839 |
840 private: | 840 private: |
841 AppWindow* app_window_; | 841 AppWindow* app_window_; |
842 content::BrowserContext* browser_context_; | 842 content::BrowserContext* browser_context_; |
843 bool waiting_; | 843 bool waiting_; |
844 }; | 844 }; |
845 | 845 |
(...skipping 11 matching lines...) Expand all Loading... |
857 if (!widget_->IsActive()) { | 857 if (!widget_->IsActive()) { |
858 waiting_ = true; | 858 waiting_ = true; |
859 content::RunMessageLoop(); | 859 content::RunMessageLoop(); |
860 } | 860 } |
861 } | 861 } |
862 | 862 |
863 // views::WidgetObserver: | 863 // views::WidgetObserver: |
864 void OnWidgetActivationChanged(views::Widget* widget, | 864 void OnWidgetActivationChanged(views::Widget* widget, |
865 bool active) override { | 865 bool active) override { |
866 if (widget_ == widget && waiting_) { | 866 if (widget_ == widget && waiting_) { |
867 base::MessageLoopForUI::current()->Quit(); | 867 base::MessageLoopForUI::current()->QuitWhenIdle(); |
868 waiting_ = false; | 868 waiting_ = false; |
869 } | 869 } |
870 } | 870 } |
871 | 871 |
872 private: | 872 private: |
873 views::Widget* widget_; | 873 views::Widget* widget_; |
874 bool waiting_; | 874 bool waiting_; |
875 }; | 875 }; |
876 | 876 |
877 scoped_refptr<Extension> extension_; | 877 scoped_refptr<Extension> extension_; |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 EXPECT_TRUE( | 1737 EXPECT_TRUE( |
1738 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 1738 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
1739 | 1739 |
1740 // chrome.tabs.setZoomSettings(). | 1740 // chrome.tabs.setZoomSettings(). |
1741 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); | 1741 error = RunSetZoomSettingsExpectError(tab_id, "manual", "per-tab"); |
1742 EXPECT_TRUE( | 1742 EXPECT_TRUE( |
1743 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); | 1743 base::MatchPattern(error, manifest_errors::kCannotAccessChromeUrl)); |
1744 } | 1744 } |
1745 | 1745 |
1746 } // namespace extensions | 1746 } // namespace extensions |
OLD | NEW |