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

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

Issue 9963079: 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(OS_WIN) && !defined(USE_AURA) 67 #if defined(USE_AURA)
68 #include "content/browser/tab_contents/tab_contents_view_aura.h"
69 #elif defined(OS_WIN)
68 #include "content/browser/tab_contents/tab_contents_view_win.h" 70 #include "content/browser/tab_contents/tab_contents_view_win.h"
69 #elif defined(TOOLKIT_GTK) 71 #elif defined(TOOLKIT_GTK)
70 #include "content/browser/tab_contents/tab_contents_view_gtk.h" 72 #include "content/browser/tab_contents/tab_contents_view_gtk.h"
71 #elif defined(OS_MACOSX) 73 #elif defined(OS_MACOSX)
72 #include "content/browser/tab_contents/web_contents_view_mac.h" 74 #include "content/browser/tab_contents/web_contents_view_mac.h"
73 #include "ui/gfx/surface/io_surface_support_mac.h" 75 #include "ui/gfx/surface/io_surface_support_mac.h"
74 #elif defined(OS_ANDROID) 76 #elif defined(OS_ANDROID)
75 #include "content/browser/tab_contents/web_contents_view_android.h" 77 #include "content/browser/tab_contents/web_contents_view_android.h"
76 #endif 78 #endif
77 79
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 has_opener_(false), 276 has_opener_(false),
275 color_chooser_(NULL) { 277 color_chooser_(NULL) {
276 render_manager_.Init(browser_context, site_instance, routing_id); 278 render_manager_.Init(browser_context, site_instance, routing_id);
277 279
278 view_.reset(content::GetContentClient()->browser()-> 280 view_.reset(content::GetContentClient()->browser()->
279 OverrideCreateWebContentsView(this)); 281 OverrideCreateWebContentsView(this));
280 if (!view_.get()) { 282 if (!view_.get()) {
281 content::WebContentsViewDelegate* delegate = 283 content::WebContentsViewDelegate* delegate =
282 content::GetContentClient()->browser()->GetWebContentsViewDelegate( 284 content::GetContentClient()->browser()->GetWebContentsViewDelegate(
283 this); 285 this);
284 #if defined(OS_WIN) && !defined(USE_AURA) 286 #if defined(USE_AURA)
287 view_.reset(new TabContentsViewAura(this, delegate));
288 #elif defined(OS_WIN)
285 view_.reset(new TabContentsViewWin(this, delegate)); 289 view_.reset(new TabContentsViewWin(this, delegate));
286 #elif defined(TOOLKIT_GTK) 290 #elif defined(TOOLKIT_GTK)
287 view_.reset(new content::TabContentsViewGtk(this, delegate)); 291 view_.reset(new content::TabContentsViewGtk(this, delegate));
288 #elif defined(OS_MACOSX) 292 #elif defined(OS_MACOSX)
289 view_.reset(web_contents_view_mac::CreateWebContentsView(this, delegate)); 293 view_.reset(web_contents_view_mac::CreateWebContentsView(this, delegate));
290 #elif defined(OS_ANDROID) 294 #elif defined(OS_ANDROID)
291 view_.reset(new WebContentsViewAndroid(this)); 295 view_.reset(new WebContentsViewAndroid(this));
292 #endif 296 #endif
293 (void)delegate; 297 (void)delegate;
294 } 298 }
(...skipping 2297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2596 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2593 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2597 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2594 // Can be NULL during tests. 2598 // Can be NULL during tests.
2595 if (rwh_view) 2599 if (rwh_view)
2596 rwh_view->SetSize(GetView()->GetContainerSize()); 2600 rwh_view->SetSize(GetView()->GetContainerSize());
2597 } 2601 }
2598 2602
2599 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { 2603 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() {
2600 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2604 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2601 } 2605 }
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