Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1244)

Side by Side Diff: components/html_viewer/html_document_application_delegate.cc

Issue 1294473008: Makes OOPIFs the default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/html_viewer/html_document_application_delegate.h" 5 #include "components/html_viewer/html_document_application_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "components/html_viewer/global_state.h" 9 #include "components/html_viewer/global_state.h"
10 #include "components/html_viewer/html_document.h" 10 #include "components/html_viewer/html_document.h"
11 #include "components/html_viewer/html_document_oopif.h" 11 #include "components/html_viewer/html_document_oopif.h"
12 #include "components/html_viewer/html_viewer_switches.h" 12 #include "components/html_viewer/html_viewer_switches.h"
13 #include "mojo/application/public/cpp/application_connection.h" 13 #include "mojo/application/public/cpp/application_connection.h"
14 #include "mojo/application/public/cpp/application_delegate.h" 14 #include "mojo/application/public/cpp/application_delegate.h"
15 #include "mojo/application/public/cpp/connect.h" 15 #include "mojo/application/public/cpp/connect.h"
16 16
17 namespace html_viewer { 17 namespace html_viewer {
18 18
19 namespace { 19 namespace {
20 20
21 bool EnableOOPIFs() { 21 bool EnableOOPIFs() {
22 return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOOPIF); 22 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
23 switches::kDisableOOPIF)) {
24 return false;
Fady Samuel 2015/08/14 21:32:36 return !base::CommandLine::ForCurrentProcess()->Ha
25 }
26 return true;
23 } 27 }
24 28
25 HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) { 29 HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) {
26 return new HTMLFrame(params); 30 return new HTMLFrame(params);
27 } 31 }
28 32
29 } // namespace 33 } // namespace
30 34
31 // ServiceConnectorQueue records all incoming service requests and processes 35 // ServiceConnectorQueue records all incoming service requests and processes
32 // them once PushRequestsTo() is called. This is useful if you need to delay 36 // them once PushRequestsTo() is called. This is useful if you need to delay
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 documents_.insert(new HTMLDocument(&params)); 189 documents_.insert(new HTMLDocument(&params));
186 } 190 }
187 191
188 if (connector_queue) { 192 if (connector_queue) {
189 connector_queue->PushRequestsTo(connection); 193 connector_queue->PushRequestsTo(connection);
190 connection->SetServiceConnector(nullptr); 194 connection->SetServiceConnector(nullptr);
191 } 195 }
192 } 196 }
193 197
194 } // namespace html_viewer 198 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698