| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" | 10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // WebUIFactory implementation. | 65 // WebUIFactory implementation. |
| 66 WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, | 66 WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, |
| 67 const GURL& url) const override { | 67 const GURL& url) const override { |
| 68 if (!(should_create_webui_ && HasWebUIScheme(url))) | 68 if (!(should_create_webui_ && HasWebUIScheme(url))) |
| 69 return NULL; | 69 return NULL; |
| 70 return new WebUIController(web_ui); | 70 return new WebUIController(web_ui); |
| 71 } | 71 } |
| 72 | 72 |
| 73 WebUI::TypeID GetWebUIType(BrowserContext* browser_context, | 73 WebUI::TypeID GetWebUIType(BrowserContext* browser_context, |
| 74 const GURL& url) const override { | 74 const GURL& url) const override { |
| 75 return WebUI::kNoWebUI; | 75 if (!(should_create_webui_ && HasWebUIScheme(url))) |
| 76 return WebUI::kNoWebUI; |
| 77 return const_cast<RenderFrameHostManagerTestWebUIControllerFactory*>(this); |
| 76 } | 78 } |
| 77 | 79 |
| 78 bool UseWebUIForURL(BrowserContext* browser_context, | 80 bool UseWebUIForURL(BrowserContext* browser_context, |
| 79 const GURL& url) const override { | 81 const GURL& url) const override { |
| 80 return HasWebUIScheme(url); | 82 return HasWebUIScheme(url); |
| 81 } | 83 } |
| 82 | 84 |
| 83 bool UseWebUIBindingsForURL(BrowserContext* browser_context, | 85 bool UseWebUIBindingsForURL(BrowserContext* browser_context, |
| 84 const GURL& url) const override { | 86 const GURL& url) const override { |
| 85 return HasWebUIScheme(url); | 87 return HasWebUIScheme(url); |
| (...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2427 EXPECT_EQ(tree4, opener_frame_trees[3]); | 2429 EXPECT_EQ(tree4, opener_frame_trees[3]); |
| 2428 | 2430 |
| 2429 EXPECT_EQ(2U, nodes_with_back_links.size()); | 2431 EXPECT_EQ(2U, nodes_with_back_links.size()); |
| 2430 EXPECT_TRUE(nodes_with_back_links.find(root1->child_at(1)) != | 2432 EXPECT_TRUE(nodes_with_back_links.find(root1->child_at(1)) != |
| 2431 nodes_with_back_links.end()); | 2433 nodes_with_back_links.end()); |
| 2432 EXPECT_TRUE(nodes_with_back_links.find(root4->child_at(0)) != | 2434 EXPECT_TRUE(nodes_with_back_links.find(root4->child_at(0)) != |
| 2433 nodes_with_back_links.end()); | 2435 nodes_with_back_links.end()); |
| 2434 } | 2436 } |
| 2435 | 2437 |
| 2436 } // namespace content | 2438 } // namespace content |
| OLD | NEW |