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

Unified Diff: components/html_viewer/html_frame.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/html_viewer/html_frame.h ('k') | components/html_viewer/html_frame_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_frame.cc
diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc
index bee05e7bd6e9299d52bba0d54efd2391104bc5d2..6ae4ca7902c960efff5715eac4ac2c5e1591f288 100644
--- a/components/html_viewer/html_frame.cc
+++ b/components/html_viewer/html_frame.cc
@@ -42,9 +42,7 @@
#include "mojo/common/common_type_converters.h"
#include "mojo/converters/blink/blink_input_events_type_converters.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/shell/public/cpp/application_impl.h"
-#include "mojo/shell/public/cpp/connect.h"
-#include "mojo/shell/public/interfaces/shell.mojom.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
@@ -177,7 +175,7 @@ HTMLFrame::HTMLFrame(CreateParams* params)
// Collect startup perf data for local main frames in test environments.
// Child frames aren't tracked, and tracking remote frames is redundant.
startup_performance_data_collector_ =
- StatsCollectionController::Install(web_frame_, GetApp());
+ StatsCollectionController::Install(web_frame_, GetShell());
}
} else if (!params->is_local_create_child && params->window &&
id_ == params->window->id()) {
@@ -319,7 +317,7 @@ blink::WebMediaPlayer* HTMLFrame::createMediaPlayer(
const blink::WebString& sink_id,
blink::WebMediaSession* media_session) {
return global_state()->media_factory()->CreateMediaPlayer(
- frame, url, client, encrypted_client, initial_cdm, GetApp()->shell());
+ frame, url, client, encrypted_client, initial_cdm, GetShell());
}
blink::WebFrame* HTMLFrame::createChildFrame(
@@ -572,8 +570,8 @@ HTMLFrame* HTMLFrame::GetFirstAncestorWithDelegate() {
return frame;
}
-mojo::ApplicationImpl* HTMLFrame::GetApp() {
- return GetFirstAncestorWithDelegate()->delegate_->GetApp();
+mojo::Shell* HTMLFrame::GetShell() {
+ return GetFirstAncestorWithDelegate()->delegate_->GetShell();
}
web_view::mojom::Frame* HTMLFrame::GetServerFrame() {
@@ -603,7 +601,7 @@ void HTMLFrame::SetWindow(mus::Window* window) {
void HTMLFrame::CreateRootWebWidget() {
DCHECK(!html_widget_);
if (window_) {
- HTMLWidgetRootLocal::CreateParams create_params(GetApp(), global_state(),
+ HTMLWidgetRootLocal::CreateParams create_params(GetShell(), global_state(),
window_);
html_widget_.reset(
delegate_->GetHTMLFactory()->CreateHTMLWidgetRootLocal(&create_params));
@@ -615,8 +613,8 @@ void HTMLFrame::CreateRootWebWidget() {
void HTMLFrame::CreateLocalRootWebWidget(blink::WebLocalFrame* local_frame) {
DCHECK(!html_widget_);
DCHECK(IsLocal());
- html_widget_.reset(
- new HTMLWidgetLocalRoot(GetApp(), global_state(), window_, local_frame));
+ html_widget_.reset(new HTMLWidgetLocalRoot(GetShell(), global_state(),
+ window_, local_frame));
}
void HTMLFrame::UpdateFocus() {
« no previous file with comments | « components/html_viewer/html_frame.h ('k') | components/html_viewer/html_frame_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698