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

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

Issue 3012001: Move implementation from header to source. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: blank line Created 10 years, 5 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 render_view_host()->FilesSelectedInChooser(std::vector<FilePath>()); 2847 render_view_host()->FilesSelectedInChooser(std::vector<FilePath>());
2848 } 2848 }
2849 2849
2850 void TabContents::BeforeUnloadFiredFromRenderManager( 2850 void TabContents::BeforeUnloadFiredFromRenderManager(
2851 bool proceed, 2851 bool proceed,
2852 bool* proceed_to_fire_unload) { 2852 bool* proceed_to_fire_unload) {
2853 if (delegate()) 2853 if (delegate())
2854 delegate()->BeforeUnloadFired(this, proceed, proceed_to_fire_unload); 2854 delegate()->BeforeUnloadFired(this, proceed, proceed_to_fire_unload);
2855 } 2855 }
2856 2856
2857 void TabContents::DidStartLoadingFromRenderManager(
2858 RenderViewHost* render_view_host) {
2859 DidStartLoading();
2860 }
2861
2862 void TabContents::RenderViewGoneFromRenderManager(
2863 RenderViewHost* render_view_host) {
2864 RenderViewGone(render_view_host);
2865 }
2866
2857 void TabContents::UpdateRenderViewSizeForRenderManager() { 2867 void TabContents::UpdateRenderViewSizeForRenderManager() {
2858 // TODO(brettw) this is a hack. See TabContentsView::SizeContents. 2868 // TODO(brettw) this is a hack. See TabContentsView::SizeContents.
2859 gfx::Size size = view_->GetContainerSize(); 2869 gfx::Size size = view_->GetContainerSize();
2860 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be 2870 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be
2861 // here during container initialization and normal window size will be set 2871 // here during container initialization and normal window size will be set
2862 // later. In case of tab duplication this resizing to 0x0 prevents setting 2872 // later. In case of tab duplication this resizing to 0x0 prevents setting
2863 // normal size later so just ignore it. 2873 // normal size later so just ignore it.
2864 if (!size.IsEmpty()) 2874 if (!size.IsEmpty())
2865 view_->SizeContents(size); 2875 view_->SizeContents(size);
2866 } 2876 }
2867 2877
2878 void TabContents::NotifySwappedFromRenderManager() {
2879 NotifySwapped();
2880 }
2881
2882 NavigationController& TabContents::GetControllerForRenderManager() {
2883 return controller();
2884 }
2885
2868 DOMUI* TabContents::CreateDOMUIForRenderManager(const GURL& url) { 2886 DOMUI* TabContents::CreateDOMUIForRenderManager(const GURL& url) {
2869 return DOMUIFactory::CreateDOMUIForURL(this, url); 2887 return DOMUIFactory::CreateDOMUIForURL(this, url);
2870 } 2888 }
2871 2889
2872 NavigationEntry* 2890 NavigationEntry*
2873 TabContents::GetLastCommittedNavigationEntryForRenderManager() { 2891 TabContents::GetLastCommittedNavigationEntryForRenderManager() {
2874 return controller_.GetLastCommittedEntry(); 2892 return controller_.GetLastCommittedEntry();
2875 } 2893 }
2876 2894
2877 bool TabContents::CreateRenderViewForRenderManager( 2895 bool TabContents::CreateRenderViewForRenderManager(
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 tab_close_start_time_ = base::TimeTicks(); 3073 tab_close_start_time_ = base::TimeTicks();
3056 } 3074 }
3057 is_showing_before_unload_dialog_ = false; 3075 is_showing_before_unload_dialog_ = false;
3058 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt); 3076 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt);
3059 } 3077 }
3060 3078
3061 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) { 3079 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) {
3062 set_suppress_javascript_messages(suppress_message_boxes); 3080 set_suppress_javascript_messages(suppress_message_boxes);
3063 } 3081 }
3064 3082
3083 TabContents* TabContents::AsTabContents() {
3084 return this;
3085 }
3086
3087 ExtensionHost* TabContents::AsExtensionHost() {
3088 return NULL;
3089 }
3090
3065 void TabContents::set_encoding(const std::string& encoding) { 3091 void TabContents::set_encoding(const std::string& encoding) {
3066 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3092 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3067 } 3093 }
3068 3094
3069 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3095 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3070 app_icon_ = app_icon; 3096 app_icon_ = app_icon;
3071 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3097 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3072 } 3098 }
3073 3099
3074 // After a successful *new* login attempt, we take the PasswordFormManager in 3100 // After a successful *new* login attempt, we take the PasswordFormManager in
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3157 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3183 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3158 } 3184 }
3159 3185
3160 Profile* TabContents::GetProfileForPasswordManager() { 3186 Profile* TabContents::GetProfileForPasswordManager() {
3161 return profile(); 3187 return profile();
3162 } 3188 }
3163 3189
3164 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3190 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3165 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3191 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3166 } 3192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698