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

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 473: Readding UI test I pulled yesterday; hopefully the bots will like it more now... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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/automation/automation_provider.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider.cc
===================================================================
--- chrome/browser/automation/automation_provider.cc (revision 1688)
+++ chrome/browser/automation/automation_provider.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/browser/save_package.h"
#include "chrome/browser/ssl_blocking_page.h"
#include "chrome/browser/web_contents.h"
+#include "chrome/browser/views/bookmark_bar_view.h"
#include "chrome/browser/views/location_bar_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/automation/automation_messages.h"
@@ -755,6 +756,8 @@
GetFindWindowVisibility)
IPC_MESSAGE_HANDLER(AutomationMsg_FindWindowLocationRequest,
HandleFindWindowLocationRequest)
+ IPC_MESSAGE_HANDLER(AutomationMsg_BookmarkBarVisibilityRequest,
+ GetBookmarkBarVisitility)
IPC_END_MESSAGE_MAP()
}
@@ -1720,6 +1723,27 @@
x, y));
}
+void AutomationProvider::GetBookmarkBarVisitility(const IPC::Message& message,
+ int handle) {
+ bool visible = false;
+ bool animating = false;
+
+ void* iter = NULL;
+ if (browser_tracker_->ContainsHandle(handle)) {
+ Browser* browser = browser_tracker_->GetResource(handle);
+ if (browser) {
+ BookmarkBarView* bookmark_bar = browser->window()->GetBookmarkBarView();
+ if (bookmark_bar) {
+ animating = bookmark_bar->IsAnimating();
+ visible = browser->window()->IsBookmarkBarVisible();
+ }
+ }
+ }
+
+ Send(new AutomationMsg_BookmarkBarVisibilityResponse(message.routing_id(),
+ visible, animating));
+}
+
void AutomationProvider::HandleInspectElementRequest(
const IPC::Message& message, int handle, int x, int y) {
WebContents* web_contents = GetWebContentsForHandle(handle, NULL);
« no previous file with comments | « chrome/browser/automation/automation_provider.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698