summaryrefslogtreecommitdiffstats
path: root/components/html_viewer
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-08-14 15:24:10 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-14 22:24:44 +0000
commitfb43a586c8e1503533438af9a5a3a4722efae155 (patch)
treecf3ff1e758185ff86cef8bc54b2990051cb6c456 /components/html_viewer
parent78d5f6edca2f34ed1945d1fa2278a4db9cee7812 (diff)
downloadchromium_src-fb43a586c8e1503533438af9a5a3a4722efae155.zip
chromium_src-fb43a586c8e1503533438af9a5a3a4722efae155.tar.gz
chromium_src-fb43a586c8e1503533438af9a5a3a4722efae155.tar.bz2
Makes OOPIFs the default
I'll nuke the old code path soonish. BUG=479172,490221 TEST=none R=fsamuel@chromium.org Review URL: https://codereview.chromium.org/1294473008 Cr-Commit-Position: refs/heads/master@{#343512}
Diffstat (limited to 'components/html_viewer')
-rw-r--r--components/html_viewer/ax_provider_apptest.cc8
-rw-r--r--components/html_viewer/html_document_application_delegate.cc6
-rw-r--r--components/html_viewer/html_frame_apptest.cc6
-rw-r--r--components/html_viewer/html_viewer_switches.cc2
-rw-r--r--components/html_viewer/html_viewer_switches.h4
5 files changed, 17 insertions, 9 deletions
diff --git a/components/html_viewer/ax_provider_apptest.cc b/components/html_viewer/ax_provider_apptest.cc
index 073926c..11b4cf2 100644
--- a/components/html_viewer/ax_provider_apptest.cc
+++ b/components/html_viewer/ax_provider_apptest.cc
@@ -30,11 +30,13 @@ bool AxTreeContainsText(const Array<AxNodePtr>& tree, const String& text) {
return false;
}
-// Switch to enable out of process iframes.
-const char kOOPIF[] = "oopifs";
+// Switch to disable out of process iframes.
+const char kDisableOOPIF[] = "disable--oopifs";
bool EnableOOPIFs() {
- return base::CommandLine::ForCurrentProcess()->HasSwitch(kOOPIF);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableOOPIF))
+ return false;
+ return true;
}
class TestFrameTreeServer : public mandoline::FrameTreeServer {
diff --git a/components/html_viewer/html_document_application_delegate.cc b/components/html_viewer/html_document_application_delegate.cc
index c97ce2de..1182fe2 100644
--- a/components/html_viewer/html_document_application_delegate.cc
+++ b/components/html_viewer/html_document_application_delegate.cc
@@ -19,7 +19,11 @@ namespace html_viewer {
namespace {
bool EnableOOPIFs() {
- return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOOPIF);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableOOPIF)) {
+ return false;
+ }
+ return true;
}
HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) {
diff --git a/components/html_viewer/html_frame_apptest.cc b/components/html_viewer/html_frame_apptest.cc
index 55688fc..d220dea 100644
--- a/components/html_viewer/html_frame_apptest.cc
+++ b/components/html_viewer/html_frame_apptest.cc
@@ -32,7 +32,7 @@ namespace mojo {
namespace {
// Switch to enable out of process iframes.
-const char kOOPIF[] = "oopifs";
+const char kDisableOOPIF[] = "disable--oopifs";
const char kAddFrameWithEmptyPageScript[] =
"var iframe = document.createElement(\"iframe\");"
@@ -40,7 +40,9 @@ const char kAddFrameWithEmptyPageScript[] =
"document.body.appendChild(iframe);";
bool EnableOOPIFs() {
- return base::CommandLine::ForCurrentProcess()->HasSwitch(kOOPIF);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableOOPIF))
+ return false;
+ return true;
}
mojo::ApplicationConnection* ApplicationConnectionForFrame(Frame* frame) {
diff --git a/components/html_viewer/html_viewer_switches.cc b/components/html_viewer/html_viewer_switches.cc
index a32056e..ba17238 100644
--- a/components/html_viewer/html_viewer_switches.cc
+++ b/components/html_viewer/html_viewer_switches.cc
@@ -7,7 +7,7 @@
namespace html_viewer {
namespace switches {
-const char kOOPIF[] = "oopifs";
+const char kDisableOOPIF[] = "disable--oopifs";
const char kOOPIFAlwaysCreateNewFrameTree[] =
"oopif-always-create-new-frame-tree";
diff --git a/components/html_viewer/html_viewer_switches.h b/components/html_viewer/html_viewer_switches.h
index 68d6b6a..5b3b25d 100644
--- a/components/html_viewer/html_viewer_switches.h
+++ b/components/html_viewer/html_viewer_switches.h
@@ -8,8 +8,8 @@
namespace html_viewer {
namespace switches {
-// Switch to enable out of process iframes.
-extern const char kOOPIF[];
+// Switch to disable out of process iframes.
+extern const char kDisableOOPIF[];
// If true a new HTMLFrameTreeManager is always created, even if a matching
// HTMLFrameTreeManager is found. This is useful for tests (or debugging) that