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

Side by Side Diff: blimp/engine/browser/blimp_engine_session.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 "blimp/engine/browser/blimp_engine_session.h" 5 #include "blimp/engine/browser/blimp_engine_session.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "blimp/common/create_blimp_message.h" 8 #include "blimp/common/create_blimp_message.h"
9 #include "blimp/common/proto/tab_control.pb.h" 9 #include "blimp/common/proto/tab_control.pb.h"
10 #include "blimp/engine/browser/blimp_browser_context.h" 10 #include "blimp/engine/browser/blimp_browser_context.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 BlimpEngineSession::~BlimpEngineSession() { 177 BlimpEngineSession::~BlimpEngineSession() {
178 render_widget_feature_.RemoveDelegate(kDummyTabId); 178 render_widget_feature_.RemoveDelegate(kDummyTabId);
179 179
180 // Safely delete network components on the IO thread. 180 // Safely delete network components on the IO thread.
181 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, 181 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
182 net_components_.release()); 182 net_components_.release());
183 } 183 }
184 184
185 void BlimpEngineSession::Initialize() { 185 void BlimpEngineSession::Initialize() {
186 DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); 186 DCHECK(!gfx::Screen::GetScreen());
187 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 187 gfx::Screen::SetScreenInstance(screen_.get());
188 188
189 #if defined(USE_X11) 189 #if defined(USE_X11)
190 window_tree_host_.reset(aura::WindowTreeHost::Create( 190 window_tree_host_.reset(aura::WindowTreeHost::Create(
191 gfx::Rect(screen_->GetPrimaryDisplay().size()))); 191 gfx::Rect(screen_->GetPrimaryDisplay().size())));
192 #else 192 #else
193 context_factory_.reset(new BlimpUiContextFactory()); 193 context_factory_.reset(new BlimpUiContextFactory());
194 aura::Env::GetInstance()->set_context_factory(context_factory_.get()); 194 aura::Env::GetInstance()->set_context_factory(context_factory_.get());
195 window_tree_host_.reset(new BlimpWindowTreeHost()); 195 window_tree_host_.reset(new BlimpWindowTreeHost());
196 #endif 196 #endif
197 197
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 aura::Window* parent = window_tree_host_->window(); 517 aura::Window* parent = window_tree_host_->window();
518 aura::Window* content = web_contents_->GetNativeView(); 518 aura::Window* content = web_contents_->GetNativeView();
519 if (!parent->Contains(content)) 519 if (!parent->Contains(content))
520 parent->AddChild(content); 520 parent->AddChild(content);
521 content->Show(); 521 content->Show();
522 } 522 }
523 523
524 } // namespace engine 524 } // namespace engine
525 } // namespace blimp 525 } // namespace blimp
OLDNEW
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller.cc ('k') | chrome/browser/android/banners/app_banner_data_fetcher_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698