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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 12995025: [Mac] DownloadShelf should be notified when autoclosing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: + NSTrackingInVisibleRect Created 7 years, 8 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 | « chrome/app/nibs/DownloadShelf.xib ('k') | chrome/browser/download/download_browsertest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 reply.SendError(error_msg); 2697 reply.SendError(error_msg);
2698 return; 2698 return;
2699 } 2699 }
2700 if (!args->GetBoolean("is_visible", &is_visible)) { 2700 if (!args->GetBoolean("is_visible", &is_visible)) {
2701 reply.SendError("'is_visible' missing or invalid."); 2701 reply.SendError("'is_visible' missing or invalid.");
2702 return; 2702 return;
2703 } 2703 }
2704 if (is_visible) { 2704 if (is_visible) {
2705 browser->window()->GetDownloadShelf()->Show(); 2705 browser->window()->GetDownloadShelf()->Show();
2706 } else { 2706 } else {
2707 browser->window()->GetDownloadShelf()->Close(); 2707 browser->window()->GetDownloadShelf()->Close(DownloadShelf::AUTOMATIC);
2708 } 2708 }
2709 reply.SendSuccess(NULL); 2709 reply.SendSuccess(NULL);
2710 } 2710 }
2711 2711
2712 void TestingAutomationProvider::IsDownloadShelfVisibleJSON( 2712 void TestingAutomationProvider::IsDownloadShelfVisibleJSON(
2713 DictionaryValue* args, 2713 DictionaryValue* args,
2714 IPC::Message* reply_message) { 2714 IPC::Message* reply_message) {
2715 AutomationJSONReply reply(this, reply_message); 2715 AutomationJSONReply reply(this, reply_message);
2716 Browser* browser; 2716 Browser* browser;
2717 std::string error_msg; 2717 std::string error_msg;
(...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after
5918 if (g_browser_process) 5918 if (g_browser_process)
5919 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 5919 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
5920 } 5920 }
5921 5921
5922 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 5922 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
5923 WebContents* tab) { 5923 WebContents* tab) {
5924 TabStripModel* tab_strip = browser->tab_strip_model(); 5924 TabStripModel* tab_strip = browser->tab_strip_model();
5925 if (tab_strip->GetActiveWebContents() != tab) 5925 if (tab_strip->GetActiveWebContents() != tab)
5926 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); 5926 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true);
5927 } 5927 }
OLDNEW
« no previous file with comments | « chrome/app/nibs/DownloadShelf.xib ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698