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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 9959119: Revert 130442 - Adds a TabContentsViewAura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/browser/tab_contents/tab_contents_view_aura.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "content/public/common/content_switches.h" 57 #include "content/public/common/content_switches.h"
58 #include "content/public/common/url_constants.h" 58 #include "content/public/common/url_constants.h"
59 #include "net/base/mime_util.h" 59 #include "net/base/mime_util.h"
60 #include "net/base/net_util.h" 60 #include "net/base/net_util.h"
61 #include "net/base/network_change_notifier.h" 61 #include "net/base/network_change_notifier.h"
62 #include "net/url_request/url_request_context_getter.h" 62 #include "net/url_request/url_request_context_getter.h"
63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
64 #include "webkit/glue/web_intent_data.h" 64 #include "webkit/glue/web_intent_data.h"
65 #include "webkit/glue/webpreferences.h" 65 #include "webkit/glue/webpreferences.h"
66 66
67 #if defined(USE_AURA) 67 #if defined(OS_WIN) && !defined(USE_AURA)
68 #include "content/browser/tab_contents/tab_contents_view_aura.h"
69 #elif defined(OS_WIN)
70 #include "content/browser/tab_contents/tab_contents_view_win.h" 68 #include "content/browser/tab_contents/tab_contents_view_win.h"
71 #elif defined(TOOLKIT_GTK) 69 #elif defined(TOOLKIT_GTK)
72 #include "content/browser/tab_contents/tab_contents_view_gtk.h" 70 #include "content/browser/tab_contents/tab_contents_view_gtk.h"
73 #elif defined(OS_MACOSX) 71 #elif defined(OS_MACOSX)
74 #include "content/browser/tab_contents/web_contents_view_mac.h" 72 #include "content/browser/tab_contents/web_contents_view_mac.h"
75 #include "ui/gfx/surface/io_surface_support_mac.h" 73 #include "ui/gfx/surface/io_surface_support_mac.h"
76 #elif defined(OS_ANDROID) 74 #elif defined(OS_ANDROID)
77 #include "content/browser/tab_contents/web_contents_view_android.h" 75 #include "content/browser/tab_contents/web_contents_view_android.h"
78 #endif 76 #endif
79 77
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 has_opener_(false), 274 has_opener_(false),
277 color_chooser_(NULL) { 275 color_chooser_(NULL) {
278 render_manager_.Init(browser_context, site_instance, routing_id); 276 render_manager_.Init(browser_context, site_instance, routing_id);
279 277
280 view_.reset(content::GetContentClient()->browser()-> 278 view_.reset(content::GetContentClient()->browser()->
281 OverrideCreateWebContentsView(this)); 279 OverrideCreateWebContentsView(this));
282 if (!view_.get()) { 280 if (!view_.get()) {
283 content::WebContentsViewDelegate* delegate = 281 content::WebContentsViewDelegate* delegate =
284 content::GetContentClient()->browser()->GetWebContentsViewDelegate( 282 content::GetContentClient()->browser()->GetWebContentsViewDelegate(
285 this); 283 this);
286 #if defined(USE_AURA) 284 #if defined(OS_WIN) && !defined(USE_AURA)
287 view_.reset(new TabContentsViewAura(this, delegate));
288 #elif defined(OS_WIN)
289 view_.reset(new TabContentsViewWin(this, delegate)); 285 view_.reset(new TabContentsViewWin(this, delegate));
290 #elif defined(TOOLKIT_GTK) 286 #elif defined(TOOLKIT_GTK)
291 view_.reset(new content::TabContentsViewGtk(this, delegate)); 287 view_.reset(new content::TabContentsViewGtk(this, delegate));
292 #elif defined(OS_MACOSX) 288 #elif defined(OS_MACOSX)
293 view_.reset(web_contents_view_mac::CreateWebContentsView(this, delegate)); 289 view_.reset(web_contents_view_mac::CreateWebContentsView(this, delegate));
294 #elif defined(OS_ANDROID) 290 #elif defined(OS_ANDROID)
295 view_.reset(new WebContentsViewAndroid(this)); 291 view_.reset(new WebContentsViewAndroid(this));
296 #endif 292 #endif
297 (void)delegate; 293 (void)delegate;
298 } 294 }
(...skipping 2297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2592 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2597 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2593 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2598 // Can be NULL during tests. 2594 // Can be NULL during tests.
2599 if (rwh_view) 2595 if (rwh_view)
2600 rwh_view->SetSize(GetView()->GetContainerSize()); 2596 rwh_view->SetSize(GetView()->GetContainerSize());
2601 } 2597 }
2602 2598
2603 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { 2599 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() {
2604 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2600 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2605 } 2601 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/browser/tab_contents/tab_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698