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

Side by Side Diff: chrome/browser/ui/constrained_window_tab_helper.cc

Issue 8603015: Get rid of a bunch of view_messages.h includes from chrome by making the TabContentsObserver inte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux and try to fix mac again 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
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/ui/constrained_window_tab_helper.h" 5 #include "chrome/browser/ui/constrained_window_tab_helper.h"
6 6
7 #include "chrome/browser/ui/constrained_window.h" 7 #include "chrome/browser/ui/constrained_window.h"
8 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" 8 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 rwhv->SetVisuallyDeemphasized(blocked ? &greyish : NULL, false); 80 rwhv->SetVisuallyDeemphasized(blocked ? &greyish : NULL, false);
81 // RenderViewHost may be NULL during shutdown. 81 // RenderViewHost may be NULL during shutdown.
82 if (contents->render_view_host()) 82 if (contents->render_view_host())
83 contents->render_view_host()->set_ignore_input_events(blocked); 83 contents->render_view_host()->set_ignore_input_events(blocked);
84 if (delegate_) 84 if (delegate_)
85 delegate_->SetTabContentBlocked(wrapper_, blocked); 85 delegate_->SetTabContentBlocked(wrapper_, blocked);
86 } 86 }
87 87
88 void ConstrainedWindowTabHelper::DidNavigateMainFrame( 88 void ConstrainedWindowTabHelper::DidNavigateMainFrame(
89 const content::LoadCommittedDetails& details, 89 const content::LoadCommittedDetails& details,
90 const ViewHostMsg_FrameNavigate_Params& params) { 90 const content::FrameNavigateParams& params) {
91 // Close constrained windows if necessary. 91 // Close constrained windows if necessary.
92 if (!net::RegistryControlledDomainService::SameDomainOrHost( 92 if (!net::RegistryControlledDomainService::SameDomainOrHost(
93 details.previous_url, details.entry->url())) 93 details.previous_url, details.entry->url()))
94 CloseConstrainedWindows(); 94 CloseConstrainedWindows();
95 } 95 }
96 96
97 void ConstrainedWindowTabHelper::DidGetIgnoredUIEvent() { 97 void ConstrainedWindowTabHelper::DidGetIgnoredUIEvent() {
98 if (constrained_window_count()) { 98 if (constrained_window_count()) {
99 ConstrainedWindow* window = *constrained_window_begin(); 99 ConstrainedWindow* window = *constrained_window_begin();
100 window->FocusConstrainedWindow(); 100 window->FocusConstrainedWindow();
101 } 101 }
102 } 102 }
103 103
104 void ConstrainedWindowTabHelper::TabContentsDestroyed(TabContents* tab) { 104 void ConstrainedWindowTabHelper::TabContentsDestroyed(TabContents* tab) {
105 // First cleanly close all child windows. 105 // First cleanly close all child windows.
106 // TODO(mpcomplete): handle case if MaybeCloseChildWindows() already asked 106 // TODO(mpcomplete): handle case if MaybeCloseChildWindows() already asked
107 // some of these to close. CloseWindows is async, so it might get called 107 // some of these to close. CloseWindows is async, so it might get called
108 // twice before it runs. 108 // twice before it runs.
109 CloseConstrainedWindows(); 109 CloseConstrainedWindows();
110 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/constrained_window_tab_helper.h ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698