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

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

Issue 8551002: browser: Add missing OVERRIDE annotation to ExternalTabContainer implementing TabContentsDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm ShowPageInfo Created 9 years, 1 month 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/browser/external_tab_container_win.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/external_tab_container_win.h" 5 #include "chrome/browser/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 const gfx::Rect& pos) { 529 const gfx::Rect& pos) {
530 if (automation_ && is_popup_window_) 530 if (automation_ && is_popup_window_)
531 automation_->Send(new AutomationMsg_MoveWindow(tab_handle_, pos)); 531 automation_->Send(new AutomationMsg_MoveWindow(tab_handle_, pos));
532 } 532 }
533 533
534 TabContentsWrapper* ExternalTabContainer::GetConstrainingContentsWrapper( 534 TabContentsWrapper* ExternalTabContainer::GetConstrainingContentsWrapper(
535 TabContentsWrapper* source) { 535 TabContentsWrapper* source) {
536 return source; 536 return source;
537 } 537 }
538 538
539 bool ExternalTabContainer::IsPopup(const TabContents* source) const { 539 bool ExternalTabContainer::IsPopupOrPanel(const TabContents* source) const {
540 return is_popup_window_; 540 return is_popup_window_;
541 } 541 }
542 542
543 void ExternalTabContainer::UpdateTargetURL(TabContents* source, 543 void ExternalTabContainer::UpdateTargetURL(TabContents* source,
544 int32 page_id, 544 int32 page_id,
545 const GURL& url) { 545 const GURL& url) {
546 Browser::UpdateTargetURLHelper(source, page_id, url); 546 Browser::UpdateTargetURLHelper(source, page_id, url);
547 if (automation_) { 547 if (automation_) {
548 std::wstring url_string = CA2W(url.spec().c_str()); 548 std::wstring url_string = CA2W(url.spec().c_str());
549 automation_->Send( 549 automation_->Send(
(...skipping 30 matching lines...) Expand all
580 } 580 }
581 } else { 581 } else {
582 DLOG(WARNING) << "Downloads are only supported with host browser network " 582 DLOG(WARNING) << "Downloads are only supported with host browser network "
583 "stack enabled."; 583 "stack enabled.";
584 } 584 }
585 585
586 // Never allow downloads. 586 // Never allow downloads.
587 return false; 587 return false;
588 } 588 }
589 589
590 void ExternalTabContainer::ShowPageInfo(Profile* profile,
591 const GURL& url,
592 const NavigationEntry::SSLStatus& ssl,
593 bool show_history) {
594 POINT cursor_pos = {0};
595 GetCursorPos(&cursor_pos);
596
597 gfx::Rect bounds;
598 bounds.set_origin(gfx::Point(cursor_pos));
599
600 PageInfoBubbleView* page_info_bubble =
601 new ExternalTabPageInfoBubbleView(this, NULL, profile, url,
602 ssl, show_history);
603 Bubble* bubble = Bubble::Show(GetWidget(), bounds,
604 views::BubbleBorder::TOP_LEFT,
605 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
606 page_info_bubble, page_info_bubble);
607 page_info_bubble->set_bubble(bubble);
608 }
609
610 void ExternalTabContainer::RegisterRenderViewHostForAutomation( 590 void ExternalTabContainer::RegisterRenderViewHostForAutomation(
611 RenderViewHost* render_view_host, bool pending_view) { 591 RenderViewHost* render_view_host, bool pending_view) {
612 if (render_view_host) { 592 if (render_view_host) {
613 AutomationResourceMessageFilter::RegisterRenderView( 593 AutomationResourceMessageFilter::RegisterRenderView(
614 render_view_host->process()->id(), 594 render_view_host->process()->id(),
615 render_view_host->routing_id(), 595 render_view_host->routing_id(),
616 tab_handle(), 596 tab_handle(),
617 automation_resource_message_filter_, 597 automation_resource_message_filter_,
618 pending_view); 598 pending_view);
619 } 599 }
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 if (params.disposition == CURRENT_TAB) { 1206 if (params.disposition == CURRENT_TAB) {
1227 DCHECK(route_all_top_level_navigations_); 1207 DCHECK(route_all_top_level_navigations_);
1228 forward_params.disposition = NEW_FOREGROUND_TAB; 1208 forward_params.disposition = NEW_FOREGROUND_TAB;
1229 } 1209 }
1230 TabContents* new_contents = 1210 TabContents* new_contents =
1231 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1211 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1232 // support only one navigation for a dummy tab before it is killed. 1212 // support only one navigation for a dummy tab before it is killed.
1233 ::DestroyWindow(GetNativeView()); 1213 ::DestroyWindow(GetNativeView());
1234 return new_contents; 1214 return new_contents;
1235 } 1215 }
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698