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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 6992018: Address bar is shown on pop-out extension windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review feedback. Created 9 years, 7 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 | « no previous file | chrome/browser/extensions/window_open_apitest.cc » ('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) 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/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 if (disposition == NEW_POPUP) { 579 if (disposition == NEW_POPUP) {
580 // Find a browser with a matching profile for creating a popup. 580 // Find a browser with a matching profile for creating a popup.
581 // (If none is found, NULL argument to NavigateParams is valid.) 581 // (If none is found, NULL argument to NavigateParams is valid.)
582 Browser* browser = BrowserList::FindTabbedBrowser( 582 Browser* browser = BrowserList::FindTabbedBrowser(
583 contents->profile(), 583 contents->profile(),
584 false); // Match incognito exactly. 584 false); // Match incognito exactly.
585 TabContentsWrapper* wrapper = new TabContentsWrapper(contents); 585 TabContentsWrapper* wrapper = new TabContentsWrapper(contents);
586 browser::NavigateParams params(browser, wrapper); 586 browser::NavigateParams params(browser, wrapper);
587 if (!browser) 587 if (!browser)
588 params.profile = contents->profile(); 588 params.profile = contents->profile();
589 // The extension_app_id parameter ends up as app_name in the Browser
590 // which causes the Browser to return true for is_app(). This affects
591 // among other things, whether the location bar gets displayed.
592 params.extension_app_id = extension_id_;
589 params.disposition = NEW_POPUP; 593 params.disposition = NEW_POPUP;
590 params.window_bounds = initial_pos; 594 params.window_bounds = initial_pos;
591 params.window_action = browser::NavigateParams::SHOW_WINDOW; 595 params.window_action = browser::NavigateParams::SHOW_WINDOW;
592 params.user_gesture = user_gesture; 596 params.user_gesture = user_gesture;
593 browser::Navigate(&params); 597 browser::Navigate(&params);
594 return; 598 return;
595 } 599 }
596 600
597 // If the tab contents isn't a popup, it's a normal tab. We need to find a 601 // If the tab contents isn't a popup, it's a normal tab. We need to find a
598 // home for it. This is typically a Browser, but it can also be some other 602 // home for it. This is typically a Browser, but it can also be some other
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 return window_id; 814 return window_id;
811 } 815 }
812 816
813 void ExtensionHost::OnRunFileChooser( 817 void ExtensionHost::OnRunFileChooser(
814 const ViewHostMsg_RunFileChooser_Params& params) { 818 const ViewHostMsg_RunFileChooser_Params& params) {
815 if (file_select_helper_.get() == NULL) 819 if (file_select_helper_.get() == NULL)
816 file_select_helper_.reset(new FileSelectHelper(profile())); 820 file_select_helper_.reset(new FileSelectHelper(profile()));
817 file_select_helper_->RunFileChooser(render_view_host_, 821 file_select_helper_->RunFileChooser(render_view_host_,
818 GetAssociatedTabContents(), params); 822 GetAssociatedTabContents(), params);
819 } 823 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698