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

Unified Diff: chrome/browser/external_tab_container.cc

Issue 20179: Reverting 9388. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/external_tab_container.h ('k') | chrome/test/automation/automation_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/external_tab_container.cc
===================================================================
--- chrome/browser/external_tab_container.cc (revision 9391)
+++ chrome/browser/external_tab_container.cc (working copy)
@@ -74,22 +74,12 @@
// Create a TabContentsContainerView to handle focus cycling using Tab and
// Shift-Tab.
+ // TODO(sanjeevr): We need to create a dummy FocusTraversable object to
+ // represent the frame of the external host. This will allow Tab and
+ // Shift-Tab to cycle into the external frame.
tab_contents_container_ = new TabContentsContainerView();
root_view_.AddChildView(tab_contents_container_);
- // Note that SetTabContents must be called after AddChildView is called
tab_contents_container_->SetTabContents(tab_contents_);
- // Add a dummy view to catch when the user tabs out of the tab
- // Create a dummy FocusTraversable object to represent the frame of the
- // external host. This will allow Tab and Shift-Tab to cycle into the
- // external frame. When the tab_contents_container_ loses focus,
- // the focus will be moved to this class (See OnSetFocus in this file).
- // An alternative to using views::View and catching when the focus manager
- // shifts the focus to the dummy view could be to implement our own view
- // and handle AboutToRequestFocusFromTabTraversal.
- views::View* dummy = new views::View();
- dummy->SetFocusable(true);
- DCHECK(dummy->IsFocusable());
- root_view_.AddChildView(dummy);
NavigationController* controller = tab_contents_->controller();
DCHECK(controller);
@@ -114,7 +104,7 @@
}
void ExternalTabContainer::OnDestroy() {
- views::FocusManager* focus_manager =
+ views::FocusManager * focus_manager =
views::FocusManager::GetFocusManager(GetHWND());
if (focus_manager) {
focus_manager->RemoveKeystrokeListener(this);
@@ -150,22 +140,10 @@
return 0;
}
-LRESULT ExternalTabContainer::OnSetFocus(UINT msg, WPARAM wp, LPARAM lp,
- BOOL& handled) {
- if (automation_) {
- views::FocusManager* focus_manager =
- views::FocusManager::GetFocusManager(GetHWND());
- DCHECK(focus_manager);
- if (focus_manager) {
- focus_manager->ClearFocus();
- automation_->Send(new AutomationMsg_TabbedOut(win_util::IsShiftPressed(),
- false));
- }
- }
+// TODO(sanjeevr): The implementation of the TabContentsDelegate interface
+// needs to be fully fleshed out based on the requirements of the
+// "Chrome tab in external browser" feature.
- return 0;
-}
-
void ExternalTabContainer::OpenURLFromTab(TabContents* source,
const GURL& url,
const GURL& referrer,
@@ -186,10 +164,10 @@
}
void ExternalTabContainer::NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {
+ unsigned changed_flags) {
if (automation_) {
automation_->Send(
- new AutomationMsg_NavigationStateChanged(0, changed_flags));
+ new AutomationMsg_NavigationStateChanged(0,changed_flags));
}
}
@@ -212,16 +190,14 @@
void ExternalTabContainer::CloseContents(TabContents* source) {
}
-void ExternalTabContainer::MoveContents(TabContents* source,
- const gfx::Rect& pos) {
+void ExternalTabContainer::MoveContents(TabContents* source, const gfx::Rect& pos) {
}
bool ExternalTabContainer::IsPopup(TabContents* source) {
return false;
}
-void ExternalTabContainer::URLStarredChanged(TabContents* source,
- bool starred) {
+void ExternalTabContainer::URLStarredChanged(TabContents* source, bool starred) {
}
void ExternalTabContainer::UpdateTargetURL(TabContents* source,
@@ -237,7 +213,7 @@
}
void ExternalTabContainer::ToolbarSizeChanged(TabContents* source,
- bool finished) {
+ bool finished) {
}
void ExternalTabContainer::ForwardMessageToExternalHost(
@@ -305,7 +281,7 @@
}
bool ExternalTabContainer::ProcessKeyDown(HWND window, UINT message,
- WPARAM wparam, LPARAM lparam) {
+ WPARAM wparam, LPARAM lparam) {
if (!automation_) {
return false;
}
@@ -348,13 +324,6 @@
DispatchMessage(&msg);
}
-void ExternalTabContainer::SetInitialFocus(bool reverse) {
- DCHECK(tab_contents_);
- if (tab_contents_) {
- tab_contents_->SetInitialFocus(reverse);
- }
-}
-
// static
bool ExternalTabContainer::IsExternalTabContainer(HWND window) {
std::wstring class_name = win_util::GetClassName(window);
« no previous file with comments | « chrome/browser/external_tab_container.h ('k') | chrome/test/automation/automation_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698